drivers/net/ethernet/mellanox/mlx5/core/steering/hws/rule.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/rule.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/rule.h- Extension
.h- Size
- 2342 bytes
- Lines
- 88
- 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_rule_match_tagstruct mlx5hws_rule_resize_infostruct mlx5hws_ruleenum mlx5hws_rule_statusenum mlx5hws_rule_move_stateenum mlx5hws_rule_jumbo_match_tag_offset
Annotated Snippet
struct mlx5hws_rule_match_tag {
union {
u8 jumbo[MLX5HWS_JUMBO_TAG_SZ];
struct {
u8 reserved[MLX5HWS_ACTIONS_SZ];
u8 match[MLX5HWS_MATCH_TAG_SZ];
};
};
};
struct mlx5hws_rule_resize_info {
u32 rtc_0;
u32 rtc_1;
u32 rule_idx;
u8 state;
u8 ctrl_seg[MLX5HWS_WQE_SZ_GTA_CTRL]; /* Ctrl segment of STE: 48 bytes */
u8 data_seg[MLX5HWS_WQE_SZ_GTA_DATA]; /* Data segment of STE: 64 bytes */
};
struct mlx5hws_rule {
struct mlx5hws_matcher *matcher;
union {
struct mlx5hws_rule_match_tag tag;
struct mlx5hws_rule_resize_info *resize_info;
};
struct mlx5hws_action_ste_chunk action_ste;
struct mlx5hws_action_ste_chunk old_action_ste;
u32 rtc_0; /* The RTC into which the STE was inserted */
u32 rtc_1; /* The RTC into which the STE was inserted */
u8 status; /* enum mlx5hws_rule_status */
u8 pending_wqes;
bool skip_delete; /* For complex rules - another rule with same tag
* still exists, so don't actually delete this rule.
*/
};
void mlx5hws_rule_skip(struct mlx5hws_matcher *matcher, u32 flow_source,
bool *skip_rx, bool *skip_tx);
void mlx5hws_rule_free_action_ste(struct mlx5hws_action_ste_chunk *action_ste);
int mlx5hws_rule_move_hws_remove(struct mlx5hws_rule *rule,
void *queue, void *user_data);
int mlx5hws_rule_move_hws_add(struct mlx5hws_rule *rule,
struct mlx5hws_rule_attr *attr);
bool mlx5hws_rule_move_in_progress(struct mlx5hws_rule *rule);
void mlx5hws_rule_clear_resize_info(struct mlx5hws_rule *rule);
#endif /* MLX5HWS_RULE_H_ */
Annotation
- Detected declarations: `struct mlx5hws_rule_match_tag`, `struct mlx5hws_rule_resize_info`, `struct mlx5hws_rule`, `enum mlx5hws_rule_status`, `enum mlx5hws_rule_move_state`, `enum mlx5hws_rule_jumbo_match_tag_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.