drivers/net/ethernet/intel/ice/ice_txrx.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_txrx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_txrx.h- Extension
.h- Size
- 13887 bytes
- Lines
- 480
- 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
net/libeth/types.hice_type.h
Detected Declarations
struct ice_tx_bufstruct ice_tx_offload_paramsstruct ice_ring_statsstruct ice_pkt_ctxstruct ice_tstamp_ringstruct ice_rx_ringstruct ice_tx_ringstruct ice_ring_containerstruct ice_coalesce_storedenum ice_tx_buf_typeenum ice_ring_state_tenum ice_dyn_idx_tenum ice_rx_dtypeenum ice_tx_ring_flagsenum ice_dynamic_itrenum ice_container_typefunction ice_ring_ch_enabledfunction ice_ring_is_xdpfunction ice_rx_pg_order
Annotated Snippet
struct ice_tx_buf {
union {
struct ice_tx_desc *next_to_watch;
u32 rs_idx;
};
union {
void *raw_buf; /* used for XDP_TX and FDir rules */
struct sk_buff *skb; /* used for .ndo_start_xmit() */
struct xdp_frame *xdpf; /* used for .ndo_xdp_xmit() */
struct xdp_buff *xdp; /* used for XDP_TX ZC */
};
unsigned int bytecount;
union {
unsigned int gso_segs;
unsigned int nr_frags; /* used for mbuf XDP */
};
u32 tx_flags:12;
u32 type:4; /* &ice_tx_buf_type */
u32 vid:16;
DEFINE_DMA_UNMAP_LEN(len);
DEFINE_DMA_UNMAP_ADDR(dma);
};
struct ice_tx_offload_params {
u64 cd_qw1;
struct ice_tx_ring *tx_ring;
u32 td_cmd;
u32 td_offset;
u32 td_l2tag1;
u32 cd_tunnel_params;
u16 cd_l2tag2;
u16 cd_gcs_params;
u8 header_len;
};
struct ice_ring_stats {
struct rcu_head rcu; /* to avoid race on free */
struct u64_stats_sync syncp;
struct_group(stats,
u64_stats_t pkts;
u64_stats_t bytes;
union {
struct_group(tx,
u64_stats_t tx_restart_q;
u64_stats_t tx_busy;
u64_stats_t tx_linearize;
/* negative if no pending Tx descriptors */
int prev_pkt;
);
struct_group(rx,
u64_stats_t rx_non_eop_descs;
u64_stats_t rx_page_failed;
u64_stats_t rx_buf_failed;
);
};
);
};
/**
* ice_stats_read - Read a single ring stat value
* @stats: pointer to ring_stats structure for a queue
* @member: the ice_ring_stats member to read
*
* Shorthand for reading a single 64-bit stat value from struct
* ice_ring_stats.
*
* Return: the value of the requested stat.
*/
#define ice_stats_read(stats, member) ({ \
struct ice_ring_stats *__stats = (stats); \
unsigned int start; \
u64 val; \
do { \
start = u64_stats_fetch_begin(&__stats->syncp); \
val = u64_stats_read(&__stats->member); \
} while (u64_stats_fetch_retry(&__stats->syncp, start)); \
val; \
})
/**
* ice_stats_inc - Increment a single ring stat value
* @stats: pointer to the ring_stats structure for a queue
* @member: the ice_ring_stats member to increment
*
* Shorthand for incrementing a single 64-bit stat value in struct
* ice_ring_stats.
*/
#define ice_stats_inc(stats, member) do { \
struct ice_ring_stats *__stats = (stats); \
u64_stats_update_begin(&__stats->syncp); \
Annotation
- Immediate include surface: `net/libeth/types.h`, `ice_type.h`.
- Detected declarations: `struct ice_tx_buf`, `struct ice_tx_offload_params`, `struct ice_ring_stats`, `struct ice_pkt_ctx`, `struct ice_tstamp_ring`, `struct ice_rx_ring`, `struct ice_tx_ring`, `struct ice_ring_container`, `struct ice_coalesce_stored`, `enum ice_tx_buf_type`.
- 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.