drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h- Extension
.h- Size
- 1087 bytes
- Lines
- 39
- 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/list.hnet/devlink.h
Detected Declarations
struct mlxsw_sp_trapstruct mlxsw_sp_trap_ops
Annotated Snippet
struct mlxsw_sp_trap {
struct mlxsw_sp_trap_policer_item *policer_items_arr;
size_t policers_count; /* Number of registered policers */
struct mlxsw_sp_trap_group_item *group_items_arr;
size_t groups_count; /* Number of registered groups */
struct mlxsw_sp_trap_item *trap_items_arr;
size_t traps_count; /* Number of registered traps */
u16 thin_policer_hw_id;
u64 max_policers;
unsigned long policers_usage[]; /* Usage bitmap */
};
struct mlxsw_sp_trap_ops {
int (*groups_init)(struct mlxsw_sp *mlxsw_sp,
const struct mlxsw_sp_trap_group_item **arr,
size_t *p_groups_count);
int (*traps_init)(struct mlxsw_sp *mlxsw_sp,
const struct mlxsw_sp_trap_item **arr,
size_t *p_traps_count);
};
extern const struct mlxsw_sp_trap_ops mlxsw_sp1_trap_ops;
extern const struct mlxsw_sp_trap_ops mlxsw_sp2_trap_ops;
#endif
Annotation
- Immediate include surface: `linux/list.h`, `net/devlink.h`.
- Detected declarations: `struct mlxsw_sp_trap`, `struct mlxsw_sp_trap_ops`.
- 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.