drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.h- Extension
.h- Size
- 2344 bytes
- Lines
- 89
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct mlx5e_post_meter_privstruct mlx5e_flow_meter_aso_objstruct mlx5e_flow_metersstruct mlx5_flow_attrstruct mlx5e_flow_meter_paramsstruct mlx5e_flow_meter_handlestruct mlx5e_meter_attrenum mlx5e_flow_meter_modefunction mlx5e_flow_meter_get_base_id
Annotated Snippet
struct mlx5e_flow_meter_params {
enum mlx5e_flow_meter_mode mode;
/* police action index */
u32 index;
u64 rate;
u64 burst;
u32 mtu;
};
struct mlx5e_flow_meter_handle {
struct mlx5e_flow_meters *flow_meters;
struct mlx5e_flow_meter_aso_obj *meters_obj;
u32 obj_id;
u8 idx;
int refcnt;
struct hlist_node hlist;
struct mlx5e_flow_meter_params params;
struct mlx5_fc *act_counter;
struct mlx5_fc *drop_counter;
};
struct mlx5e_meter_attr {
struct mlx5e_flow_meter_params params;
struct mlx5e_flow_meter_handle *meter;
struct mlx5e_post_meter_priv *post_meter;
};
int
mlx5e_tc_meter_modify(struct mlx5_core_dev *mdev,
struct mlx5e_flow_meter_handle *meter,
struct mlx5e_flow_meter_params *meter_params);
struct mlx5e_flow_meter_handle *
mlx5e_tc_meter_get(struct mlx5_core_dev *mdev, struct mlx5e_flow_meter_params *params);
void
mlx5e_tc_meter_put(struct mlx5e_flow_meter_handle *meter);
int
mlx5e_tc_meter_update(struct mlx5e_flow_meter_handle *meter,
struct mlx5e_flow_meter_params *params);
struct mlx5e_flow_meter_handle *
mlx5e_tc_meter_replace(struct mlx5_core_dev *mdev, struct mlx5e_flow_meter_params *params);
enum mlx5_flow_namespace_type
mlx5e_tc_meter_get_namespace(struct mlx5e_flow_meters *flow_meters);
struct mlx5e_flow_meters *
mlx5e_flow_meters_init(struct mlx5e_priv *priv,
enum mlx5_flow_namespace_type ns_type,
struct mlx5e_post_act *post_action);
void
mlx5e_flow_meters_cleanup(struct mlx5e_flow_meters *flow_meters);
void
mlx5e_tc_meter_get_stats(struct mlx5e_flow_meter_handle *meter,
u64 *bytes, u64 *packets, u64 *drops, u64 *lastuse);
#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
int mlx5e_flow_meter_get_base_id(struct mlx5e_flow_meter_handle *meter);
#else /* CONFIG_MLX5_CLS_ACT */
static inline int
mlx5e_flow_meter_get_base_id(struct mlx5e_flow_meter_handle *meter)
{
return 0;
}
#endif /* CONFIG_MLX5_CLS_ACT */
#endif /* __MLX5_EN_FLOW_METER_H__ */
Annotation
- Detected declarations: `struct mlx5e_post_meter_priv`, `struct mlx5e_flow_meter_aso_obj`, `struct mlx5e_flow_meters`, `struct mlx5_flow_attr`, `struct mlx5e_flow_meter_params`, `struct mlx5e_flow_meter_handle`, `struct mlx5e_meter_attr`, `enum mlx5e_flow_meter_mode`, `function mlx5e_flow_meter_get_base_id`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.