drivers/net/ethernet/brocade/bna/bfi_enet.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/brocade/bna/bfi_enet.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/brocade/bna/bfi_enet.h- Extension
.h- Size
- 20094 bytes
- Lines
- 848
- 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
bfa_defs.hbfi.h
Detected Declarations
struct bfi_enet_txq_wi_basestruct bfi_enet_txq_wi_extstruct bfi_enet_txq_wi_vectorstruct bfi_enet_txq_entrystruct bfi_enet_rxq_entrystruct bfi_enet_cq_entrystruct bfi_enet_qstruct bfi_enet_txqstruct bfi_enet_rxqstruct bfi_enet_cqstruct bfi_enet_ib_cfgstruct bfi_enet_ibstruct bfi_enet_reqstruct bfi_enet_enable_reqstruct bfi_enet_rspstruct bfi_enet_attr_reqstruct bfi_enet_attr_rspstruct bfi_enet_tx_cfgstruct bfi_enet_tx_cfg_reqstruct bfi_enet_tx_cfg_rspstruct bfi_enet_rx_cfgstruct bfi_enet_rx_cfg_reqstruct bfi_enet_rx_cfg_rspstruct bfi_enet_rit_reqstruct bfi_enet_rss_cfgstruct bfi_enet_rss_cfg_reqstruct bfi_enet_ucast_reqstruct bfi_enet_mac_n_vlan_reqstruct bfi_enet_mcast_add_reqstruct bfi_enet_mcast_add_rspstruct bfi_enet_mcast_del_reqstruct bfi_enet_rx_vlan_reqstruct bfi_enet_set_pause_reqstruct bfi_enet_diag_lb_reqstruct bfi_enet_stats_reqstruct bfi_enet_stats_txfstruct bfi_enet_stats_rxfstruct bfi_enet_stats_fc_txstruct bfi_enet_stats_fc_rxstruct bfi_enet_stats_radstruct bfi_enet_stats_bpcstruct bfi_enet_stats_macstruct bfi_enet_statsenum bfi_enet_h2i_msgsenum bfi_enet_i2h_msgsenum bfi_enet_errenum bfi_enet_tx_vlan_modeenum bfi_enet_rxq_type
Annotated Snippet
struct bfi_enet_txq_wi_base {
u8 reserved;
u8 num_vectors; /* number of vectors present */
u16 opcode;
/* BFI_ENET_TXQ_WI_SEND or BFI_ENET_TXQ_WI_SEND_LSO */
u16 flags; /* OR of all the flags */
u16 l4_hdr_size_n_offset;
u16 vlan_tag;
u16 lso_mss; /* Only 14 LSB are valid */
u32 frame_length; /* Only 24 LSB are valid */
} __packed;
struct bfi_enet_txq_wi_ext {
u16 reserved;
u16 opcode; /* BFI_ENET_TXQ_WI_EXTENSION */
u32 reserved2[3];
} __packed;
struct bfi_enet_txq_wi_vector { /* Tx Buffer Descriptor */
u16 reserved;
u16 length; /* Only 14 LSB are valid */
union bfi_addr_be_u addr;
} __packed;
/* TxQ Entry Structure */
struct bfi_enet_txq_entry {
union {
struct bfi_enet_txq_wi_base base;
struct bfi_enet_txq_wi_ext ext;
} __packed wi;
struct bfi_enet_txq_wi_vector vector[BFI_ENET_TXQ_WI_VECT_MAX];
} __packed;
#define wi_hdr wi.base
#define wi_ext_hdr wi.ext
#define BFI_ENET_TXQ_WI_L4_HDR_N_OFFSET(_hdr_size, _offset) \
(((_hdr_size) << 10) | ((_offset) & 0x3FF))
/* R X Q U E U E D E F I N E S */
struct bfi_enet_rxq_entry {
union bfi_addr_be_u rx_buffer;
} __packed;
/* R X C O M P L E T I O N Q U E U E D E F I N E S */
/* CQ Entry Flags */
#define BFI_ENET_CQ_EF_MAC_ERROR BIT(0)
#define BFI_ENET_CQ_EF_FCS_ERROR BIT(1)
#define BFI_ENET_CQ_EF_TOO_LONG BIT(2)
#define BFI_ENET_CQ_EF_FC_CRC_OK BIT(3)
#define BFI_ENET_CQ_EF_RSVD1 BIT(4)
#define BFI_ENET_CQ_EF_L4_CKSUM_OK BIT(5)
#define BFI_ENET_CQ_EF_L3_CKSUM_OK BIT(6)
#define BFI_ENET_CQ_EF_HDS_HEADER BIT(7)
#define BFI_ENET_CQ_EF_UDP BIT(8)
#define BFI_ENET_CQ_EF_TCP BIT(9)
#define BFI_ENET_CQ_EF_IP_OPTIONS BIT(10)
#define BFI_ENET_CQ_EF_IPV6 BIT(11)
#define BFI_ENET_CQ_EF_IPV4 BIT(12)
#define BFI_ENET_CQ_EF_VLAN BIT(13)
#define BFI_ENET_CQ_EF_RSS BIT(14)
#define BFI_ENET_CQ_EF_RSVD2 BIT(15)
#define BFI_ENET_CQ_EF_MCAST_MATCH BIT(16)
#define BFI_ENET_CQ_EF_MCAST BIT(17)
#define BFI_ENET_CQ_EF_BCAST BIT(18)
#define BFI_ENET_CQ_EF_REMOTE BIT(19)
#define BFI_ENET_CQ_EF_LOCAL BIT(20)
/* CQ Entry Structure */
struct bfi_enet_cq_entry {
u32 flags;
u16 vlan_tag;
u16 length;
u32 rss_hash;
u8 valid;
u8 reserved1;
u8 reserved2;
u8 rxq_id;
} __packed;
/* E N E T C O N T R O L P A T H C O M M A N D S */
struct bfi_enet_q {
union bfi_addr_u pg_tbl;
union bfi_addr_u first_entry;
u16 pages; /* # of pages */
Annotation
- Immediate include surface: `bfa_defs.h`, `bfi.h`.
- Detected declarations: `struct bfi_enet_txq_wi_base`, `struct bfi_enet_txq_wi_ext`, `struct bfi_enet_txq_wi_vector`, `struct bfi_enet_txq_entry`, `struct bfi_enet_rxq_entry`, `struct bfi_enet_cq_entry`, `struct bfi_enet_q`, `struct bfi_enet_txq`, `struct bfi_enet_rxq`, `struct bfi_enet_cq`.
- 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.