drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h- Extension
.h- Size
- 9517 bytes
- Lines
- 252
- 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/netdevice.hlinux/if_bridge.hlinux/if_vlan.hlinux/if_ether.hlinux/rhashtable.hlinux/xarray.hfs_core.h
Detected Declarations
struct mlx5_esw_bridge_fdb_keystruct mlx5_esw_bridge_mdb_keystruct mlx5_esw_bridge_fdb_entrystruct mlx5_esw_bridge_mdb_entrystruct mlx5_esw_bridge_vlanstruct mlx5_esw_bridge_portstruct mlx5_esw_bridge
Annotated Snippet
struct mlx5_esw_bridge_fdb_key {
unsigned char addr[ETH_ALEN];
u16 vid;
};
struct mlx5_esw_bridge_mdb_key {
unsigned char addr[ETH_ALEN];
u16 vid;
};
enum {
MLX5_ESW_BRIDGE_FLAG_ADDED_BY_USER = BIT(0),
MLX5_ESW_BRIDGE_FLAG_PEER = BIT(1),
MLX5_ESW_BRIDGE_FLAG_DELETED = BIT(2),
};
enum {
MLX5_ESW_BRIDGE_PORT_FLAG_PEER = BIT(0),
};
struct mlx5_esw_bridge_fdb_entry {
struct mlx5_esw_bridge_fdb_key key;
struct rhash_head ht_node;
struct net_device *dev;
struct list_head list;
struct list_head vlan_list;
u16 vport_num;
u16 esw_owner_vhca_id;
u16 flags;
struct mlx5_flow_handle *ingress_handle;
struct mlx5_fc *ingress_counter;
unsigned long lastuse;
struct mlx5_flow_handle *egress_handle;
struct mlx5_flow_handle *filter_handle;
};
struct mlx5_esw_bridge_mdb_entry {
struct mlx5_esw_bridge_mdb_key key;
struct rhash_head ht_node;
struct list_head list;
struct xarray ports;
int num_ports;
struct mlx5_flow_handle *egress_handle;
};
struct mlx5_esw_bridge_vlan {
u16 vid;
u16 flags;
struct list_head fdb_list;
struct mlx5_pkt_reformat *pkt_reformat_push;
struct mlx5_pkt_reformat *pkt_reformat_pop;
struct mlx5_modify_hdr *pkt_mod_hdr_push_mark;
struct mlx5_flow_handle *mcast_handle;
};
struct mlx5_esw_bridge_port {
u16 vport_num;
u16 esw_owner_vhca_id;
u16 flags;
struct mlx5_esw_bridge *bridge;
struct xarray vlans;
struct {
struct mlx5_flow_table *ft;
struct mlx5_flow_group *filter_fg;
struct mlx5_flow_group *vlan_fg;
struct mlx5_flow_group *qinq_fg;
struct mlx5_flow_group *fwd_fg;
struct mlx5_flow_handle *filter_handle;
struct mlx5_flow_handle *fwd_handle;
} mcast;
};
struct mlx5_esw_bridge {
int ifindex;
int refcnt;
struct list_head list;
struct mlx5_esw_bridge_offloads *br_offloads;
struct dentry *debugfs_dir;
struct list_head fdb_list;
struct rhashtable fdb_ht;
struct list_head mdb_list;
struct rhashtable mdb_ht;
struct mlx5_flow_table *egress_ft;
struct mlx5_flow_group *egress_vlan_fg;
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/if_bridge.h`, `linux/if_vlan.h`, `linux/if_ether.h`, `linux/rhashtable.h`, `linux/xarray.h`, `fs_core.h`.
- Detected declarations: `struct mlx5_esw_bridge_fdb_key`, `struct mlx5_esw_bridge_mdb_key`, `struct mlx5_esw_bridge_fdb_entry`, `struct mlx5_esw_bridge_mdb_entry`, `struct mlx5_esw_bridge_vlan`, `struct mlx5_esw_bridge_port`, `struct mlx5_esw_bridge`.
- 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.