drivers/net/ethernet/mellanox/mlx5/core/fs_pool.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/fs_pool.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/fs_pool.h- Extension
.h- Size
- 1680 bytes
- Lines
- 57
- 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
linux/mlx5/driver.h
Detected Declarations
struct mlx5_fs_bulkstruct mlx5_fs_pool_indexstruct mlx5_fs_poolstruct mlx5_fs_pool_opsstruct mlx5_fs_pool
Annotated Snippet
struct mlx5_fs_bulk {
struct list_head pool_list;
int bulk_len;
unsigned long *bitmask;
};
struct mlx5_fs_pool_index {
struct mlx5_fs_bulk *fs_bulk;
int index;
};
struct mlx5_fs_pool;
struct mlx5_fs_pool_ops {
int (*bulk_destroy)(struct mlx5_core_dev *dev, struct mlx5_fs_bulk *bulk);
struct mlx5_fs_bulk * (*bulk_create)(struct mlx5_core_dev *dev,
void *pool_ctx);
void (*update_threshold)(struct mlx5_fs_pool *pool);
};
struct mlx5_fs_pool {
struct mlx5_core_dev *dev;
void *pool_ctx;
const struct mlx5_fs_pool_ops *ops;
struct mutex pool_lock; /* protects pool lists */
struct list_head fully_used;
struct list_head partially_used;
struct list_head unused;
int available_units;
int used_units;
int threshold;
};
void mlx5_fs_bulk_init(struct mlx5_fs_bulk *fs_bulk, int bulk_len);
int mlx5_fs_bulk_bitmap_alloc(struct mlx5_core_dev *dev,
struct mlx5_fs_bulk *fs_bulk);
void mlx5_fs_bulk_cleanup(struct mlx5_fs_bulk *fs_bulk);
int mlx5_fs_bulk_get_free_amount(struct mlx5_fs_bulk *bulk);
void mlx5_fs_pool_init(struct mlx5_fs_pool *pool, struct mlx5_core_dev *dev,
const struct mlx5_fs_pool_ops *ops, void *pool_ctx);
void mlx5_fs_pool_cleanup(struct mlx5_fs_pool *pool);
int mlx5_fs_pool_acquire_index(struct mlx5_fs_pool *fs_pool,
struct mlx5_fs_pool_index *pool_index);
int mlx5_fs_pool_release_index(struct mlx5_fs_pool *fs_pool,
struct mlx5_fs_pool_index *pool_index);
#endif /* __MLX5_FS_POOL_H__ */
Annotation
- Immediate include surface: `linux/mlx5/driver.h`.
- Detected declarations: `struct mlx5_fs_bulk`, `struct mlx5_fs_pool_index`, `struct mlx5_fs_pool`, `struct mlx5_fs_pool_ops`, `struct mlx5_fs_pool`.
- 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.