drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h- Extension
.h- Size
- 2824 bytes
- Lines
- 121
- 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
mlx5hws.hfs_hws_pools.h
Detected Declarations
struct mlx5_fs_hws_actions_poolstruct mlx5_fs_hws_contextstruct mlx5_fs_hws_tablestruct mlx5_fs_hws_actionstruct mlx5_fs_hws_matcherstruct mlx5_fs_hws_rule_actionstruct mlx5_fs_hws_rulestruct mlx5_fs_hws_datastruct mlx5_fs_hws_create_action_ctxfunction mlx5_fs_hws_action_get_pkt_reformat_idfunction mlx5_fs_hws_is_supported
Annotated Snippet
struct mlx5_fs_hws_actions_pool {
struct mlx5hws_action *tag_action;
struct mlx5hws_action *pop_vlan_action;
struct mlx5hws_action *push_vlan_action;
struct mlx5hws_action *drop_action;
struct mlx5hws_action *decapl2_action;
struct mlx5hws_action *remove_hdr_vlan_action;
struct mlx5_fs_pool insert_hdr_pool;
struct mlx5_fs_pool dl3tnltol2_pool;
struct xarray el2tol3tnl_pools;
struct xarray el2tol2tnl_pools;
struct xarray mh_pools;
struct xarray table_dests;
struct xarray vport_vhca_dests;
struct xarray vport_dests;
struct xarray aso_meters;
struct xarray sample_dests;
};
struct mlx5_fs_hws_context {
struct mlx5hws_context *hws_ctx;
struct mlx5_fs_hws_actions_pool hws_pool;
};
struct mlx5_fs_hws_table {
struct mlx5hws_table *hws_table;
bool miss_ft_set;
};
struct mlx5_fs_hws_action {
struct mlx5hws_action *hws_action;
struct mlx5_fs_pool *fs_pool;
struct mlx5_fs_hws_pr *pr_data;
struct mlx5_fs_hws_mh *mh_data;
u32 fw_reformat_id;
/* Protect `fw_reformat_id` against being initialized from multiple
* threads.
*/
struct mutex lock;
};
struct mlx5_fs_hws_matcher {
struct mlx5hws_bwc_matcher *matcher;
};
struct mlx5_fs_hws_rule_action {
struct mlx5hws_action *action;
union {
struct mlx5_fc *counter;
struct mlx5_exe_aso *exe_aso;
u32 sampler_id;
};
};
struct mlx5_fs_hws_rule {
struct mlx5hws_bwc_rule *bwc_rule;
struct mlx5_fs_hws_rule_action *hws_fs_actions;
int num_fs_actions;
};
struct mlx5_fs_hws_data {
struct mlx5hws_action *hws_action;
struct mutex lock; /* protects hws_action */
refcount_t hws_action_refcount;
};
struct mlx5_fs_hws_create_action_ctx {
enum mlx5hws_action_type actions_type;
struct mlx5hws_context *hws_ctx;
u32 id;
union {
u8 return_reg_id;
};
};
struct mlx5hws_action *
mlx5_fs_get_hws_action(struct mlx5_fs_hws_data *fs_hws_data,
struct mlx5_fs_hws_create_action_ctx *create_ctx);
void mlx5_fs_put_hws_action(struct mlx5_fs_hws_data *fs_hws_data);
#ifdef CONFIG_MLX5_HW_STEERING
int
mlx5_fs_hws_action_get_pkt_reformat_id(struct mlx5_pkt_reformat *pkt_reformat,
u32 *reformat_id);
bool mlx5_fs_hws_is_supported(struct mlx5_core_dev *dev);
const struct mlx5_flow_cmds *mlx5_fs_cmd_get_hws_cmds(void);
Annotation
- Immediate include surface: `mlx5hws.h`, `fs_hws_pools.h`.
- Detected declarations: `struct mlx5_fs_hws_actions_pool`, `struct mlx5_fs_hws_context`, `struct mlx5_fs_hws_table`, `struct mlx5_fs_hws_action`, `struct mlx5_fs_hws_matcher`, `struct mlx5_fs_hws_rule_action`, `struct mlx5_fs_hws_rule`, `struct mlx5_fs_hws_data`, `struct mlx5_fs_hws_create_action_ctx`, `function mlx5_fs_hws_action_get_pkt_reformat_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.