Home
last modified time | relevance | path

Searched refs:repr (Results 1 – 25 of 121) sorted by relevance

12345

/linux/drivers/net/ethernet/intel/ice/
H A Dice_repr.c19 void ice_repr_inc_tx_stats(struct ice_repr *repr, unsigned int len, in ice_repr_inc_tx_stats() argument
26 this_cpu_inc(repr->stats->tx_drops); in ice_repr_inc_tx_stats()
30 stats = this_cpu_ptr(repr->stats); in ice_repr_inc_tx_stats()
44 struct ice_repr *repr = ice_netdev_to_repr(netdev); in ice_repr_inc_rx_stats() local
47 stats = this_cpu_ptr(repr->stats); in ice_repr_inc_rx_stats()
63 struct ice_repr *repr = np->repr; in ice_repr_get_stats64() local
67 if (repr->ops.ready(repr)) in ice_repr_get_stats64()
69 vsi = repr->src_vsi; in ice_repr_get_stats64()
94 return np->repr; in ice_netdev_to_repr()
109 struct ice_repr *repr = ice_netdev_to_repr(netdev); in ice_repr_vf_open() local
[all …]
H A Dice_eswitch.c89 ice_eswitch_release_repr(struct ice_pf *pf, struct ice_repr *repr) in ice_eswitch_release_repr() argument
91 struct ice_vsi *vsi = repr->src_vsi; in ice_eswitch_release_repr()
94 if (!repr->dst) in ice_eswitch_release_repr()
98 dst_release(&repr->dst->dst); in ice_eswitch_release_repr()
99 repr->dst = NULL; in ice_eswitch_release_repr()
100 ice_fltr_add_mac_and_broadcast(vsi, repr->parent_mac, in ice_eswitch_release_repr()
109 static int ice_eswitch_setup_repr(struct ice_pf *pf, struct ice_repr *repr) in ice_eswitch_setup_repr() argument
112 struct ice_vsi *vsi = repr->src_vsi; in ice_eswitch_setup_repr()
115 repr->dst = metadata_dst_alloc(0, METADATA_HW_PORT_MUX, in ice_eswitch_setup_repr()
117 if (!repr->dst) in ice_eswitch_setup_repr()
[all …]
H A Dice_repr.h37 int (*add)(struct ice_repr *repr);
38 void (*rem)(struct ice_repr *repr);
39 int (*ready)(struct ice_repr *repr);
46 void ice_repr_destroy(struct ice_repr *repr);
48 void ice_repr_start_tx_queues(struct ice_repr *repr);
49 void ice_repr_stop_tx_queues(struct ice_repr *repr);
54 void ice_repr_inc_tx_stats(struct ice_repr *repr, unsigned int len,
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_repr.c30 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_inc_tx_stats() local
35 this_cpu_inc(repr->stats->tx_drops); in nfp_repr_inc_tx_stats()
39 stats = this_cpu_ptr(repr->stats); in nfp_repr_inc_tx_stats()
48 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_inc_rx_stats() local
51 stats = this_cpu_ptr(repr->stats); in nfp_repr_inc_rx_stats()
92 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_get_stats64() local
94 if (WARN_ON(!repr->port)) in nfp_repr_get_stats64()
97 switch (repr->port->type) { in nfp_repr_get_stats64()
99 if (!__nfp_port_get_eth_port(repr->port)) in nfp_repr_get_stats64()
101 nfp_repr_phy_port_get_stats64(repr->port, stats); in nfp_repr_get_stats64()
[all …]
H A Dnfp_app.c47 struct nfp_repr *repr = netdev_priv(netdev); in nfp_app_from_netdev() local
49 return repr->app; in nfp_app_from_netdev()
162 struct net_device *repr; in nfp_app_netdev_feat_change() local
164 repr = rtnl_dereference(reprs->reprs[i]); in nfp_app_netdev_feat_change()
165 if (!repr) in nfp_app_netdev_feat_change()
168 nfp_repr_transfer_features(repr, netdev); in nfp_app_netdev_feat_change()
/linux/rust/zerocopy-derive/
H A Drepr.rs27 /// This is the result of processing all `#[repr(...)]` attributes on a type, if
29 /// `#[repr(...)]` attributes.
32 /// `#[repr(transparent)]`
34 /// A compound representation: `repr(C)`, `repr(Rust)`, or `repr(Int)`
35 /// optionally combined with `repr(packed(...))` or `repr(align(...))`
39 /// A compound representation: `repr(C)`, `repr(Rus
[all...]
/linux/rust/syn/
H A Dlit.rs61 repr: Box<LitRepr>,
68 repr: Box<LitRepr>,
75 repr: Box<LitRepr>,
82 repr: Box<LitRepr>,
89 repr: Box<LitRepr>,
101 repr: Box<LitIntRepr>,
116 repr: Box<LitFloatRepr>,
139 repr: Box::new(LitRepr { in new()
147 let repr = self.repr.token.to_string(); in value() localVariable
148 let (value, _suffix) = value::parse_lit_str(&repr); in value()
[all …]
H A Dbigint.rs16 let mut repr = String::with_capacity(self.digits.len()); in to_string() localVariable
22 repr.push((*digit + b'0') as char); in to_string()
26 if repr.is_empty() { in to_string()
27 repr.push('0'); in to_string()
30 repr in to_string()
/linux/rust/zerocopy/src/util/
H A Dmacro_util.rs60 note = "consider using `#[repr(packed)]` to remove padding"
78 note = "consider using `#[repr(packed)]` to remove padding"
92 #[repr(C, align(65536))]
236 // SAFETY: `OffsetOfTrailingIsAlignment` is `repr(C)`, and its layout is
256 #[repr(C)]
299 note = "consider using `#[repr(packed)]` to remove padding",
300 note = "`IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized`"
326 /// repr, the size of the type already takes into account any padding that the
328 /// as `repr(C)`) can use this macro to check for padding. Note that while this
329 /// may yield some consistent value for some `repr(Rus
[all...]
H A Dmacros.rs168 /// Implements `$trait` for `$ty` where `$ty: TransmuteFrom<$repr>` (and
177 => $trait:ident for $ty:ty [$repr:ty]
187 // instantiates `T` with `$ty` and `R` with `$repr`, and establishes
188 // `$repr: $trait`. The supported traits - `TryFromBytes`,
191 // `$ty` and `$repr` have the same size.
194 // `$repr` have the same size. Without that premise, `TransmuteFrom`
215 is_trait::<$ty, $repr>();
222 $trait for $ty [$repr]
234 TryFromBytes for $ty:ty [$repr:ty]
241 // SAFETY: This macro ensures that `$repr` an
[all...]
/linux/rust/zerocopy-derive/derive/
H A Dunaligned.rs7 repr::{EnumRepr, StructUnionRepr},
25 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; in derive_unaligned_struct() localVariable
26 repr.unaligned_validate_no_align_gt_1()?; in derive_unaligned_struct()
28 let field_bounds = if repr.is_packed_1() { in derive_unaligned_struct()
30 } else if repr.is_c() || repr.is_transparent() { in derive_unaligned_struct()
46 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; in derive_unaligned_enum() localVariable
47 repr.unaligned_validate_no_align_gt_1()?; in derive_unaligned_enum()
49 if !repr.is_u8() && !repr.is_i8() { in derive_unaligned_enum()
65 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; in derive_unaligned_union() localVariable
66 repr.unaligned_validate_no_align_gt_1()?; in derive_unaligned_union()
[all …]
H A Dinto_bytes.rs8 repr::{EnumRepr, StructUnionRepr},
90 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; in derive_into_bytes_struct()
92 let is_transparent = repr.is_transparent(); in derive_into_bytes_struct()
93 let is_c = repr.is_c(); in derive_into_bytes_struct()
94 let is_packed_1 = repr.is_packed_1(); in derive_into_bytes_struct()
97 if is_c && !repr.is_align_gt_1() { homogeneous_field_bounds(ctx, strct) } else { None }; in derive_into_bytes_struct()
103 // - repr(transparent): The layout and ABI of the whole struct is the in derive_into_bytes_enum()
107 // - repr(packed): Any inter-field padding bytes are removed, meaning in derive_into_bytes_enum()
110 // padding). Note that this holds regardless of other `repr` in derive_into_bytes_enum()
111 // attributes, including `repr(Rus in derive_into_bytes_enum()
22 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; derive_into_bytes_struct() localVariable
102 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; derive_into_bytes_enum() localVariable
152 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; derive_into_bytes_union() localVariable
[all...]
H A Dknown_layout.rs8 repr::StructUnionRepr,
14 repr: &StructUnionRepr, in derive_known_layout_for_repr_c_struct()
23 let repr_align = repr in derive_known_layout_for_repr_c_struct()
30 let repr_packed = repr in derive_known_layout_for_repr_c_struct()
103 // - that type is `repr(C)`, in derive_known_layout_for_repr_c_struct()
197 // the same repr as the target type, and by using field types in derive_known_layout_for_repr_c_struct()
202 #repr in derive_known_layout_for_repr_c_struct()
213 // `repr(packed)`. In that case, Rust needs to know that the in derive_known_layout_for_repr_c_struct()
253 // If this is a `repr(C)` struct, then `c_struct_repr` contains the entire in derive()
254 // `repr` attribut in derive()
255 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; derive() localVariable
[all...]
H A Dtry_from_bytes.rs12 repr::EnumRepr,
124 repr: &EnumRepr, in generate_variant_structs()
126 if !(repr.is_c() || repr.is_primitive()) {
129 "must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout", in variants_union_field_ident()
139 let tag_enum = generate_tag_enum(ctx, repr, data); in generate_variants_union()
320 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; in derive_is_bit_valid()
325 // `FromBytes`). This holds if, for `repr(uN)` or `repr(i in derive_is_bit_valid()
669 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; derive_try_from_bytes_enum() localVariable
[all...]
H A Dfrom_bytes.rs11 repr::{CompoundRepr, EnumRepr, Repr, Spanned},
75 // Unknown negative discriminant (e.g. const repr) in find_zero_variant()
126 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; in derive_from_zeros_enum()
128 // We don't actually care what the repr is; we just care that it's one of in derive_from_zeros_enum()
130 match repr { in derive_from_zeros_enum()
137 "must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout", in derive_from_zeros_enum()
185 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; in derive_from_bytes_enum()
187 let variants_required = 1usize << enum_size_from_repr(&repr)?; in derive_from_bytes_enum()
193 repr in derive_from_bytes_union()
114 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; derive_from_zeros_enum() localVariable
173 let repr = EnumRepr::from_attrs(&ctx.ast.attrs)?; derive_from_bytes_enum() localVariable
[all...]
H A Dmod.rs15 repr::StructUnionRepr,
96 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; in derive_split_at()
106 if !(repr.is_c() || repr.is_transparent()) { in derive_split_at()
109 "must have #[repr(C)] or #[repr(transparent)] in order to guarantee this type's layout is splitable", in derive_split_at()
123 if repr.get_packed().is_some() { quote!(#zerocopy_crate::Unalign<#elem>) } else { elem }; in derive_split_at()
125 // SAFETY: The checks above require `repr(C)` or `repr(transparent)`, and in derive_split_at()
136 // [1] Per https://doc.rust-lang.org/1.93.0/reference/type-layout.html#layout.repr in derive_split_at()
95 let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; derive_split_at() localVariable
[all...]
/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dmain.c287 struct nfp_repr *repr = netdev_priv(netdev); in nfp_flower_reprs_reify() local
289 err = nfp_flower_cmsg_portreify(repr, exists); in nfp_flower_reprs_reify()
319 nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr) in nfp_flower_repr_netdev_open() argument
323 err = nfp_flower_cmsg_portmod(repr, true, repr->netdev->mtu, false); in nfp_flower_repr_netdev_open()
327 netif_tx_wake_all_queues(repr->netdev); in nfp_flower_repr_netdev_open()
333 nfp_flower_repr_netdev_stop(struct nfp_app *app, struct nfp_repr *repr) in nfp_flower_repr_netdev_stop() argument
335 netif_tx_disable(repr->netdev); in nfp_flower_repr_netdev_stop()
337 return nfp_flower_cmsg_portmod(repr, false, repr->netdev->mtu, false); in nfp_flower_repr_netdev_stop()
343 struct nfp_repr *repr = netdev_priv(netdev); in nfp_flower_repr_netdev_clean() local
345 kfree(repr->app_priv); in nfp_flower_repr_netdev_clean()
[all …]
H A Dqos_conf.c175 struct nfp_repr *repr; in nfp_flower_install_rate_limiter() local
188 repr = netdev_priv(netdev); in nfp_flower_install_rate_limiter()
189 repr_priv = repr->app_priv; in nfp_flower_install_rate_limiter()
198 if (repr->port->type != NFP_PORT_VF_PORT) { in nfp_flower_install_rate_limiter()
274 nfp_flower_offload_one_police(repr->app, true, in nfp_flower_install_rate_limiter()
297 struct nfp_repr *repr; in nfp_flower_remove_rate_limiter() local
305 repr = netdev_priv(netdev); in nfp_flower_remove_rate_limiter()
308 repr_priv = repr->app_priv; in nfp_flower_remove_rate_limiter()
329 skb = nfp_flower_cmsg_alloc(repr->app, sizeof(struct nfp_police_config), in nfp_flower_remove_rate_limiter()
339 nfp_ctrl_tx(repr->app->ctrl, skb); in nfp_flower_remove_rate_limiter()
[all …]
H A Dcmsg.c75 int nfp_flower_cmsg_portmod(struct nfp_repr *repr, bool carrier_ok, in nfp_flower_cmsg_portmod() argument
81 skb = nfp_flower_cmsg_alloc(repr->app, sizeof(*msg), in nfp_flower_cmsg_portmod()
87 msg->portnum = cpu_to_be32(repr->dst->u.port_info.port_id); in nfp_flower_cmsg_portmod()
96 nfp_ctrl_tx(repr->app->ctrl, skb); in nfp_flower_cmsg_portmod()
101 int nfp_flower_cmsg_portreify(struct nfp_repr *repr, bool exists) in nfp_flower_cmsg_portreify() argument
106 skb = nfp_flower_cmsg_alloc(repr->app, sizeof(*msg), in nfp_flower_cmsg_portreify()
113 msg->portnum = cpu_to_be32(repr->dst->u.port_info.port_id); in nfp_flower_cmsg_portreify()
117 nfp_ctrl_tx(repr->app->ctrl, skb); in nfp_flower_cmsg_portreify()
H A Dlag_conf.c312 struct nfp_repr *repr; in nfp_fl_lag_do_work() local
358 repr = netdev_priv(iter_netdev); in nfp_fl_lag_do_work()
360 if (repr->app != priv->app) { in nfp_fl_lag_do_work()
370 repr_priv = repr->app_priv; in nfp_fl_lag_do_work()
548 struct nfp_repr *repr; in nfp_fl_lag_changeupper_event() local
561 repr = netdev_priv(iter_netdev); in nfp_fl_lag_changeupper_event()
564 if (repr->app != priv->app) { in nfp_fl_lag_changeupper_event()
627 struct nfp_repr *repr; in nfp_fl_lag_changels_event() local
638 repr = netdev_priv(netdev); in nfp_fl_lag_changels_event()
641 if (repr->app != priv->app) in nfp_fl_lag_changels_event()
[all …]
/linux/rust/proc-macro2/
H A Dfallback.rs113 }) if literal.repr.starts_with('-') => { in push_token_from_proc_macro()
121 literal.repr.remove(0); in push_token_from_proc_macro()
923 pub(crate) repr: String, field
944 pub(crate) fn _new(repr: String) -> Self { in _new()
946 repr, in _new()
951 pub(crate) fn from_str_checked(repr: &str) -> Result<Self, LexError> { in from_str_checked()
952 let mut cursor = get_cursor(repr); in from_str_checked()
967 literal.repr.insert(0, '-'); in from_str_checked()
981 pub(crate) unsafe fn from_str_unchecked(repr: &str) -> Self { in from_str_unchecked()
982 Literal::_new(repr.to_owned()) in from_str_unchecked()
[all …]
/linux/rust/zerocopy/src/
H A Dmacros.rs98 // NOTE: `repr(packed)` is important! It ensures that the size of
106 #[repr(C, packed)]
112 // SAFETY: `Transmute` is a `repr(C)` union whose `src` field has
144 // size_of::<Transmute<Src, Dst>>()`. A `#[repr(C, packed)]`
299 /// #[repr(C)]
518 /// #[repr(C)]
729 /// #[repr(C)]
879 /// #[repr(C)]
992 #[repr($repr
[all...]
/linux/rust/kernel/
H A Dbitmap.rs27 #[cfg_attr(CONFIG_64BIT, repr(align(8)))]
28 #[cfg_attr(not(CONFIG_64BIT), repr(align(4)))]
144 #[repr(C)]
182 /// * if `nbits <= MAX_INLINE_LEN`, then `repr` is a `usize`.
183 /// * otherwise, `repr` holds a non-null pointer to an initialized in deref_mut()
187 repr: BitmapRepr, in deref_mut()
200 core::ptr::addr_of!(self.repr.bitmap)
204 unsafe { self.repr.ptr.as_ptr() }
219 core::ptr::addr_of_mut!(self.repr.bitmap) in drop()
223 unsafe { self.repr in drop()
156 repr: BitmapRepr, global() field
[all...]
/linux/drivers/net/ethernet/netronome/nfp/abm/
H A Dmain.c33 struct nfp_repr *repr = netdev_priv(netdev); in nfp_abm_setup_tc() local
42 return nfp_abm_setup_root(netdev, repr->app_priv, type_data); in nfp_abm_setup_tc()
44 return nfp_abm_setup_tc_mq(netdev, repr->app_priv, type_data); in nfp_abm_setup_tc()
46 return nfp_abm_setup_tc_red(netdev, repr->app_priv, type_data); in nfp_abm_setup_tc()
48 return nfp_abm_setup_tc_gred(netdev, repr->app_priv, type_data); in nfp_abm_setup_tc()
50 return nfp_abm_setup_cls_block(netdev, repr, type_data); in nfp_abm_setup_tc()
83 struct nfp_repr *repr; in nfp_abm_spawn_repr() local
99 repr = netdev_priv(netdev); in nfp_abm_spawn_repr()
100 repr->app_priv = alink; in nfp_abm_spawn_repr()
129 WARN(nfp_repr_get_locked(app, reprs, alink->id), "duplicate repr"); in nfp_abm_spawn_repr()
384 struct nfp_repr *repr = netdev_priv(port->netdev); nfp_abm_port_get_stats() local
401 struct nfp_repr *repr = netdev_priv(port->netdev); nfp_abm_port_get_stats_count() local
414 struct nfp_repr *repr = netdev_priv(port->netdev); nfp_abm_port_get_stats_strings() local
[all...]
H A Dcls.c231 struct nfp_repr *repr = cb_priv; in nfp_abm_setup_tc_block_cb() local
234 alink = repr->app_priv; in nfp_abm_setup_tc_block_cb()
241 if (!tc_cls_can_offload_and_chain0(repr->netdev, &cls_u32->common)) in nfp_abm_setup_tc_block_cb()
267 int nfp_abm_setup_cls_block(struct net_device *netdev, struct nfp_repr *repr, in nfp_abm_setup_cls_block() argument
272 repr, repr, true); in nfp_abm_setup_cls_block()

12345