drivers/net/ethernet/meta/fbnic/fbnic_txrx.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_txrx.h- Extension
.h- Size
- 5888 bytes
- Lines
- 208
- 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
linux/netdevice.hlinux/skbuff.hlinux/types.hlinux/u64_stats_sync.hnet/xdp.h
Detected Declarations
struct fbnic_netstruct fbnic_pkt_buffstruct fbnic_queue_statsstruct fbnic_rx_bufstruct fbnic_ringstruct fbnic_q_triadstruct fbnic_napi_vectorfunction fbnic_napi_idx
Annotated Snippet
struct fbnic_pkt_buff {
struct xdp_buff buff;
ktime_t hwtstamp;
bool add_frag_failed;
};
struct fbnic_queue_stats {
u64 packets;
u64 bytes;
union {
struct {
u64 csum_partial;
u64 lso;
u64 ts_packets;
u64 ts_lost;
u64 stop;
u64 wake;
} twq;
struct {
u64 alloc_failed;
u64 csum_complete;
u64 csum_none;
u64 length_errors;
} rx;
struct {
u64 alloc_failed;
} bdq;
};
u64 dropped;
struct u64_stats_sync syncp;
};
#define FBNIC_PAGECNT_BIAS_MAX PAGE_SIZE
struct fbnic_rx_buf {
netmem_ref netmem;
long pagecnt_bias;
};
struct fbnic_ring {
/* Pointer to buffer specific info */
union {
struct fbnic_pkt_buff *pkt; /* RCQ */
struct fbnic_rx_buf *rx_buf; /* BDQ */
void **tx_buf; /* TWQ */
void *buffer; /* Generic pointer */
};
u32 __iomem *doorbell; /* Pointer to CSR space for ring */
__le64 *desc; /* Descriptor ring memory */
u16 size_mask; /* Size of ring in descriptors - 1 */
u8 q_idx; /* Logical netdev ring index */
u8 flags; /* Ring flags (FBNIC_RING_F_*) */
u32 head, tail; /* Head/Tail of ring */
union {
/* Rx BDQs only */
struct page_pool *page_pool;
/* Deferred_head is used to cache the head for TWQ1 if
* an attempt is made to clean TWQ1 with zero napi_budget.
* We do not use it for any other ring.
*/
s32 deferred_head;
};
struct fbnic_queue_stats stats;
/* Slow path fields follow */
dma_addr_t dma; /* Phys addr of descriptor memory */
size_t size; /* Size of descriptor ring in memory */
};
struct fbnic_q_triad {
struct fbnic_ring sub0, sub1, cmpl;
struct xdp_rxq_info xdp_rxq;
};
struct fbnic_napi_vector {
struct napi_struct napi;
struct device *dev; /* Device for DMA unmapping */
struct fbnic_dev *fbd;
struct dentry *dbg_nv;
u16 v_idx;
u8 txt_count;
u8 rxt_count;
struct fbnic_q_triad qt[];
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/skbuff.h`, `linux/types.h`, `linux/u64_stats_sync.h`, `net/xdp.h`.
- Detected declarations: `struct fbnic_net`, `struct fbnic_pkt_buff`, `struct fbnic_queue_stats`, `struct fbnic_rx_buf`, `struct fbnic_ring`, `struct fbnic_q_triad`, `struct fbnic_napi_vector`, `function fbnic_napi_idx`.
- 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.