drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h- Extension
.h- Size
- 29344 bytes
- Lines
- 942
- 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 mlx5hws_contextstruct mlx5hws_tablestruct mlx5hws_matcherstruct mlx5hws_rulestruct mlx5hws_context_attrstruct mlx5hws_table_attrstruct mlx5hws_matcher_attrstruct mlx5hws_rule_attrstruct mlx5hws_rule_actionstruct mlx5hws_action_reformat_headerstruct mlx5hws_action_insert_headerstruct mlx5hws_action_remove_header_attrstruct mlx5hws_action_mh_patternstruct mlx5hws_action_dest_attrstruct mlx5hws_flow_op_resultstruct mlx5hws_bwc_matcherstruct mlx5hws_bwc_rulestruct mlx5hws_match_parametersenum mlx5hws_table_typeenum mlx5hws_matcher_resource_modeenum mlx5hws_action_typeenum mlx5hws_action_flagsenum mlx5hws_action_aso_meter_colorenum mlx5hws_send_queue_actionsenum mlx5hws_matcher_flow_srcenum mlx5hws_matcher_insert_modeenum mlx5hws_matcher_distribute_modeenum mlx5hws_matcher_size_typeenum mlx5hws_flow_op_statusfunction mlx5hws_is_supported
Annotated Snippet
struct mlx5hws_context_attr {
u16 queues;
u16 queue_size;
};
struct mlx5hws_table_attr {
enum mlx5hws_table_type type;
u32 level;
u16 uid;
};
enum mlx5hws_matcher_flow_src {
MLX5HWS_MATCHER_FLOW_SRC_ANY = 0x0,
MLX5HWS_MATCHER_FLOW_SRC_WIRE = 0x1,
MLX5HWS_MATCHER_FLOW_SRC_VPORT = 0x2,
};
enum mlx5hws_matcher_insert_mode {
MLX5HWS_MATCHER_INSERT_BY_HASH = 0x0,
MLX5HWS_MATCHER_INSERT_BY_INDEX = 0x1,
};
enum mlx5hws_matcher_distribute_mode {
MLX5HWS_MATCHER_DISTRIBUTE_BY_HASH = 0x0,
MLX5HWS_MATCHER_DISTRIBUTE_BY_LINEAR = 0x1,
};
enum mlx5hws_matcher_size_type {
MLX5HWS_MATCHER_SIZE_TYPE_RX,
MLX5HWS_MATCHER_SIZE_TYPE_TX,
MLX5HWS_MATCHER_SIZE_TYPE_MAX,
};
union mlx5hws_matcher_size {
struct {
u8 sz_row_log;
u8 sz_col_log;
} table;
struct {
u8 num_log;
} rule;
};
struct mlx5hws_matcher_attr {
/* Processing priority inside table */
u32 priority;
/* Provide all rules with unique rule_idx in num_log range to reduce locking */
bool optimize_using_rule_idx;
/* Resource mode and corresponding size */
enum mlx5hws_matcher_resource_mode mode;
/* Optimize insertion in case packet origin is the same for all rules */
enum mlx5hws_matcher_flow_src optimize_flow_src;
/* Define the insertion and distribution modes for this matcher */
enum mlx5hws_matcher_insert_mode insert_mode;
enum mlx5hws_matcher_distribute_mode distribute_mode;
/* Define whether the created matcher supports resizing into a bigger matcher */
bool resizable;
union mlx5hws_matcher_size size[MLX5HWS_MATCHER_SIZE_TYPE_MAX];
/* Optional AT attach configuration - Max number of additional AT */
u8 max_num_of_at_attach;
/* Optional end FT (miss FT ID) for match RTC (for isolated matcher) */
u32 isolated_matcher_end_ft_id;
};
struct mlx5hws_rule_attr {
void *user_data;
/* Valid if matcher optimize_using_rule_idx is set or
* if matcher is configured to insert rules by index.
*/
u32 rule_idx;
u32 flow_source;
u16 queue_id;
u32 burst:1;
};
/* In actions that take offset, the offset is unique, pointing to a single
* resource and the user should not reuse the same index because data changing
* is not atomic.
*/
struct mlx5hws_rule_action {
struct mlx5hws_action *action;
union {
struct {
u32 value;
} tag;
struct {
u32 offset;
} counter;
Annotation
- Detected declarations: `struct mlx5hws_context`, `struct mlx5hws_table`, `struct mlx5hws_matcher`, `struct mlx5hws_rule`, `struct mlx5hws_context_attr`, `struct mlx5hws_table_attr`, `struct mlx5hws_matcher_attr`, `struct mlx5hws_rule_attr`, `struct mlx5hws_rule_action`, `struct mlx5hws_action_reformat_header`.
- 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.