drivers/net/ethernet/cavium/thunder/nicvf_queues.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/thunder/nicvf_queues.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/thunder/nicvf_queues.h- Extension
.h- Size
- 11346 bytes
- Lines
- 373
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/netdevice.hlinux/iommu.hnet/xdp.hq_struct.h
Detected Declarations
struct rx_tx_queue_statsstruct q_desc_memstruct pgcachestruct rbdrstruct rcv_queuestruct cmp_queuestruct snd_queuestruct queue_setenum CQ_RX_ERRLVL_Eenum CQ_RX_ERROP_Eenum CQ_TX_ERROP_Eenum RQ_SQ_STATSfunction nicvf_iova_to_phys
Annotated Snippet
struct rx_tx_queue_stats {
u64 bytes;
u64 pkts;
} ____cacheline_aligned_in_smp;
struct q_desc_mem {
dma_addr_t dma;
u64 size;
u32 q_len;
dma_addr_t phys_base;
void *base;
void *unalign_base;
};
struct pgcache {
struct page *page;
int ref_count;
u64 dma_addr;
};
struct rbdr {
bool enable;
u32 dma_size;
u32 frag_len;
u32 thresh; /* Threshold level for interrupt */
void *desc;
u32 head;
u32 tail;
struct q_desc_mem dmem;
bool is_xdp;
/* For page recycling */
int pgidx;
int pgcnt;
int pgalloc;
struct pgcache *pgcache;
} ____cacheline_aligned_in_smp;
struct rcv_queue {
bool enable;
struct rbdr *rbdr_start;
struct rbdr *rbdr_cont;
bool en_tcp_reassembly;
u8 cq_qs; /* CQ's QS to which this RQ is assigned */
u8 cq_idx; /* CQ index (0 to 7) in the QS */
u8 cont_rbdr_qs; /* Continue buffer ptrs - QS num */
u8 cont_qs_rbdr_idx; /* RBDR idx in the cont QS */
u8 start_rbdr_qs; /* First buffer ptrs - QS num */
u8 start_qs_rbdr_idx; /* RBDR idx in the above QS */
u8 caching;
struct rx_tx_queue_stats stats;
struct xdp_rxq_info xdp_rxq;
} ____cacheline_aligned_in_smp;
struct cmp_queue {
bool enable;
u16 thresh;
spinlock_t lock; /* lock to serialize processing CQEs */
void *desc;
struct q_desc_mem dmem;
int irq;
} ____cacheline_aligned_in_smp;
struct snd_queue {
bool enable;
u8 cq_qs; /* CQ's QS to which this SQ is pointing */
u8 cq_idx; /* CQ index (0 to 7) in the above QS */
u16 thresh;
atomic_t free_cnt;
u32 head;
u32 tail;
u64 *skbuff;
void *desc;
u64 *xdp_page;
u16 xdp_desc_cnt;
u16 xdp_free_cnt;
bool is_xdp;
/* For TSO segment's header */
char *tso_hdrs;
dma_addr_t tso_hdrs_phys;
cpumask_t affinity_mask;
struct q_desc_mem dmem;
struct rx_tx_queue_stats stats;
} ____cacheline_aligned_in_smp;
struct queue_set {
bool enable;
bool be_en;
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/iommu.h`, `net/xdp.h`, `q_struct.h`.
- Detected declarations: `struct rx_tx_queue_stats`, `struct q_desc_mem`, `struct pgcache`, `struct rbdr`, `struct rcv_queue`, `struct cmp_queue`, `struct snd_queue`, `struct queue_set`, `enum CQ_RX_ERRLVL_E`, `enum CQ_RX_ERROP_E`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.