drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.h- Extension
.h- Size
- 8759 bytes
- Lines
- 317
- 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_action_default_stcstruct mlx5hws_action_shared_stcstruct mlx5hws_actions_apply_datastruct mlx5hws_actions_wqe_setterstruct mlx5hws_actions_wqe_setterstruct mlx5hws_action_templatestruct mlx5hws_range_action_tablestruct mlx5hws_actionenum mlx5hws_action_stc_idxenum mlx5hws_action_offsetenum mlx5hws_action_setter_flagfunction mlx5hws_action_setter_default_singlefunction mlx5hws_action_setter_default_doublefunction mlx5hws_action_setter_default_ctrfunction mlx5hws_action_apply_setter
Annotated Snippet
struct mlx5hws_action_default_stc {
struct mlx5hws_pool_chunk nop_ctr;
struct mlx5hws_pool_chunk nop_dw5;
struct mlx5hws_pool_chunk nop_dw6;
struct mlx5hws_pool_chunk nop_dw7;
struct mlx5hws_pool_chunk default_hit;
u32 refcount; /* protected by context ctrl lock */
};
struct mlx5hws_action_shared_stc {
struct mlx5hws_pool_chunk stc_chunk;
u32 refcount; /* protected by context ctrl lock */
};
struct mlx5hws_actions_apply_data {
struct mlx5hws_send_engine *queue;
struct mlx5hws_rule_action *rule_action;
__be32 *wqe_data;
struct mlx5hws_wqe_gta_ctrl_seg *wqe_ctrl;
u32 jump_to_action_stc;
struct mlx5hws_context_common_res *common_res;
enum mlx5hws_table_type tbl_type;
u32 next_direct_idx;
u8 require_dep;
};
struct mlx5hws_actions_wqe_setter;
typedef void (*mlx5hws_action_setter_fp)(struct mlx5hws_actions_apply_data *apply,
struct mlx5hws_actions_wqe_setter *setter);
struct mlx5hws_actions_wqe_setter {
mlx5hws_action_setter_fp set_single;
mlx5hws_action_setter_fp set_double;
mlx5hws_action_setter_fp set_triple;
mlx5hws_action_setter_fp set_hit;
mlx5hws_action_setter_fp set_ctr;
u8 idx_single;
u8 idx_double;
u8 idx_triple;
u8 idx_ctr;
u8 idx_hit;
u8 stage_idx;
u8 flags;
};
struct mlx5hws_action_template {
struct mlx5hws_actions_wqe_setter setters[MLX5HWS_ACTION_MAX_STE];
enum mlx5hws_action_type *action_type_arr;
u8 num_of_action_stes;
u8 num_actions;
u8 only_term;
};
struct mlx5hws_range_action_table {
struct mlx5hws_pool *pool;
u32 rtc_0_id;
u32 rtc_1_id;
};
struct mlx5hws_action {
u8 type;
u8 flags;
struct mlx5hws_context *ctx;
union {
struct {
struct mlx5hws_pool_chunk stc;
union {
struct {
u32 pat_id;
u32 arg_id;
__be64 single_action;
u32 nop_locations;
u8 num_of_patterns;
u8 single_action_type;
u8 num_of_actions;
u8 max_num_of_actions;
u8 require_reparse;
} modify_header;
struct {
u32 arg_id;
u32 header_size;
u16 max_hdr_sz;
u8 num_of_hdrs;
u8 anchor;
u8 e_anchor;
u8 offset;
bool encap;
u8 require_reparse;
} reformat;
Annotation
- Detected declarations: `struct mlx5hws_action_default_stc`, `struct mlx5hws_action_shared_stc`, `struct mlx5hws_actions_apply_data`, `struct mlx5hws_actions_wqe_setter`, `struct mlx5hws_actions_wqe_setter`, `struct mlx5hws_action_template`, `struct mlx5hws_range_action_table`, `struct mlx5hws_action`, `enum mlx5hws_action_stc_idx`, `enum mlx5hws_action_offset`.
- 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.