drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h- Extension
.h- Size
- 20174 bytes
- Lines
- 634
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bnx2x_vfpf.hbnx2x.h
Detected Declarations
struct bnx2x_sriovstruct bnx2x_vf_barstruct bnx2x_vf_bar_infostruct bnx2x_vf_queuestruct bnx2x_vf_queue_construct_paramsstruct bnx2x_virtfstruct bnx2x_vf_mac_vlan_filterstruct bnx2x_vf_mac_vlan_filtersstruct bnx2x_virtfstruct bnx2x_vf_mbx_msgstruct bnx2x_vf_mbxstruct bnx2x_vf_spstruct hw_dmastruct bnx2x_vfdbstruct pf_vf_bulletin_contentenum sample_bulletin_resultfunction vf_igu_sbfunction vf_hc_qzonefunction vfq_cl_idfunction vfq_stat_idfunction vfq_qzone_idfunction bnx2x_vf_fill_fw_strfunction bnx2x_vf_ustorm_prods_offsetfunction bnx2x_vf_headroomfunction bnx2x_iov_set_queue_sp_objfunction bnx2x_vf_mbxfunction bnx2x_iov_init_dqfunction bnx2x_iov_free_memfunction bnx2x_iov_init_dmaefunction bnx2x_iov_remove_onefunction bnx2x_disable_sriovfunction bnx2x_vfpf_releasefunction bnx2x_vfpf_initfunction bnx2x_vfpf_close_vffunction bnx2x_vfpf_config_macfunction bnx2x_vfpf_config_rssfunction bnx2x_vfpf_set_mcastfunction bnx2x_vfpf_storm_rx_modefunction bnx2x_iov_nic_initfunction bnx2x_vf_headroomfunction bnx2x_iov_adjust_stats_reqfunction bnx2x_sample_bulletinfunction bnx2x_timer_sriovfunction bnx2x_vf_pci_deallocfunction bnx2x_pf_set_vfs_vlanfunction bnx2x_iov_channel_downfunction bnx2x_set_vf_link_statefunction bnx2x_vf_bulletin_finalize
Annotated Snippet
struct bnx2x_sriov {
u32 first_vf_in_pf;
/* standard SRIOV capability fields, mostly for debugging */
int pos; /* capability position */
int nres; /* number of resources */
u32 cap; /* SR-IOV Capabilities */
u16 ctrl; /* SR-IOV Control */
u16 total; /* total VFs associated with the PF */
u16 initial; /* initial VFs associated with the PF */
u16 nr_virtfn; /* number of VFs available */
u16 offset; /* first VF Routing ID offset */
u16 stride; /* following VF stride */
u32 pgsz; /* page size for BAR alignment */
u8 link; /* Function Dependency Link */
};
/* bars */
struct bnx2x_vf_bar {
u64 bar;
u32 size;
};
struct bnx2x_vf_bar_info {
struct bnx2x_vf_bar bars[PCI_SRIOV_NUM_BARS];
u8 nr_bars;
};
/* vf queue (used both for rx or tx) */
struct bnx2x_vf_queue {
struct eth_context *cxt;
/* MACs object */
struct bnx2x_vlan_mac_obj mac_obj;
/* VLANs object */
struct bnx2x_vlan_mac_obj vlan_obj;
/* VLAN-MACs object */
struct bnx2x_vlan_mac_obj vlan_mac_obj;
unsigned long accept_flags; /* last accept flags configured */
/* Queue Slow-path State object */
struct bnx2x_queue_sp_obj sp_obj;
u32 cid;
u16 index;
u16 sb_idx;
bool is_leading;
bool sp_initialized;
};
/* struct bnx2x_vf_queue_construct_params - prepare queue construction
* parameters: q-init, q-setup and SB index
*/
struct bnx2x_vf_queue_construct_params {
struct bnx2x_queue_state_params qstate;
struct bnx2x_queue_setup_params prep_qsetup;
};
/* forward */
struct bnx2x_virtf;
/* VFOP definitions */
struct bnx2x_vf_mac_vlan_filter {
int type;
#define BNX2X_VF_FILTER_MAC BIT(0)
#define BNX2X_VF_FILTER_VLAN BIT(1)
#define BNX2X_VF_FILTER_VLAN_MAC \
(BNX2X_VF_FILTER_MAC | BNX2X_VF_FILTER_VLAN) /*shortcut*/
bool add;
bool applied;
u8 *mac;
u16 vid;
};
struct bnx2x_vf_mac_vlan_filters {
int count;
struct bnx2x_vf_mac_vlan_filter filters[];
};
/* vf context */
struct bnx2x_virtf {
u16 cfg_flags;
#define VF_CFG_STATS_COALESCE 0x1
#define VF_CFG_EXT_BULLETIN 0x2
#define VF_CFG_VLAN_FILTER 0x4
Annotation
- Immediate include surface: `bnx2x_vfpf.h`, `bnx2x.h`.
- Detected declarations: `struct bnx2x_sriov`, `struct bnx2x_vf_bar`, `struct bnx2x_vf_bar_info`, `struct bnx2x_vf_queue`, `struct bnx2x_vf_queue_construct_params`, `struct bnx2x_virtf`, `struct bnx2x_vf_mac_vlan_filter`, `struct bnx2x_vf_mac_vlan_filters`, `struct bnx2x_virtf`, `struct bnx2x_vf_mbx_msg`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.