drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action_ste_pool.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action_ste_pool.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action_ste_pool.h- Extension
.h- Size
- 2259 bytes
- Lines
- 70
- 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_ste_pool_elementstruct mlx5hws_action_ste_tablestruct mlx5hws_action_ste_pool_elementstruct mlx5hws_action_ste_poolstruct mlx5hws_action_ste_chunk
Annotated Snippet
struct mlx5hws_action_ste_table {
struct mlx5hws_action_ste_pool_element *parent_elem;
/* Wraps the RTC and STE range for this given action. */
struct mlx5hws_pool *pool;
/* Match STEs use this STC to jump to this pool's RTC. */
struct mlx5hws_pool_chunk stc;
u32 rtc_0_id;
u32 rtc_1_id;
struct list_head list_node;
unsigned long last_used;
};
struct mlx5hws_action_ste_pool_element {
struct mlx5hws_context *ctx;
struct mlx5hws_action_ste_pool *parent_pool;
size_t log_sz; /* Size of the largest table so far. */
enum mlx5hws_pool_optimize opt;
struct list_head available;
struct list_head full;
};
/* Central repository of action STEs. The context contains one of these pools
* per queue.
*/
struct mlx5hws_action_ste_pool {
/* Protects the entire pool. We have one pool per queue and only one
* operation can be active per rule at a given time. Thus this lock
* protects solely against concurrent garbage collection and we expect
* very little contention.
*/
struct mutex lock;
struct mlx5hws_action_ste_pool_element elems[MLX5HWS_POOL_OPTIMIZE_MAX];
};
/* A chunk of STEs and the table it was allocated from. Used by rules. */
struct mlx5hws_action_ste_chunk {
struct mlx5hws_action_ste_table *action_tbl;
struct mlx5hws_pool_chunk ste;
};
int mlx5hws_action_ste_pool_init(struct mlx5hws_context *ctx);
void mlx5hws_action_ste_pool_uninit(struct mlx5hws_context *ctx);
/* Callers are expected to fill chunk->ste.order. On success, this function
* populates chunk->tbl and chunk->ste.offset.
*/
int mlx5hws_action_ste_chunk_alloc(struct mlx5hws_action_ste_pool *pool,
bool skip_rx, bool skip_tx,
struct mlx5hws_action_ste_chunk *chunk);
void mlx5hws_action_ste_chunk_free(struct mlx5hws_action_ste_chunk *chunk);
#endif /* ACTION_STE_POOL_H_ */
Annotation
- Detected declarations: `struct mlx5hws_action_ste_pool_element`, `struct mlx5hws_action_ste_table`, `struct mlx5hws_action_ste_pool_element`, `struct mlx5hws_action_ste_pool`, `struct mlx5hws_action_ste_chunk`.
- 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.