drivers/net/ethernet/intel/idpf/idpf_txrx.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/idpf/idpf_txrx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/idpf/idpf_txrx.h- Extension
.h- Size
- 36010 bytes
- Lines
- 1135
- 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/dim.hnet/libeth/cache.hnet/libeth/types.hnet/netdev_queues.hnet/tcp.hnet/xdp.hidpf_lan_txrx.hvirtchnl2_lan_desc.h
Detected Declarations
struct libeth_rq_napi_statsstruct idpf_tx_offload_paramsstruct idpf_tx_splitq_paramsstruct idpf_ptype_statestruct idpf_vec_regsstruct idpf_intr_regstruct idpf_q_vectorstruct idpf_rx_queue_statsstruct idpf_tx_queue_statsstruct idpf_rx_queuestruct idpf_tx_queuestruct idpf_buf_queuestruct idpf_compl_queuestruct idpf_sw_queuestruct idpf_rxq_setstruct idpf_bufq_setstruct idpf_rxq_groupstruct idpf_txq_groupenum idpf_tx_ctx_desc_eipt_offloadenum idpf_tunnel_stateenum idpf_queue_flags_tfunction idpf_q_vector_to_memfunction fragfunction idpf_tx_singleq_build_ctobfunction idpf_tx_splitq_build_descfunction idpf_vport_intr_set_wb_on_itrfunction idpf_tx_splitq_get_free_bufs
Annotated Snippet
struct idpf_tx_offload_params {
u32 tx_flags;
u32 hdr_offsets;
u32 cd_tunneling;
u32 tso_len;
u16 mss;
u16 tso_segs;
u16 tso_hdr_len;
u16 td_cmd;
};
/**
* struct idpf_tx_splitq_params
* @dtype: General descriptor info
* @eop_cmd: Type of EOP
* @compl_tag: Associated tag for completion
* @td_tag: Descriptor tunneling tag
* @offload: Offload parameters
* @prev_ntu: stored TxQ next_to_use in case of rollback
* @prev_refill_ntc: stored refillq next_to_clean in case of packet rollback
* @prev_refill_gen: stored refillq generation bit in case of packet rollback
*/
struct idpf_tx_splitq_params {
enum idpf_tx_desc_dtype_value dtype;
u16 eop_cmd;
union {
u16 compl_tag;
u16 td_tag;
};
struct idpf_tx_offload_params offload;
u16 prev_ntu;
u16 prev_refill_ntc;
bool prev_refill_gen;
};
enum idpf_tx_ctx_desc_eipt_offload {
IDPF_TX_CTX_EXT_IP_NONE = 0x0,
IDPF_TX_CTX_EXT_IP_IPV6 = 0x1,
IDPF_TX_CTX_EXT_IP_IPV4_NO_CSUM = 0x2,
IDPF_TX_CTX_EXT_IP_IPV4 = 0x3
};
#define IDPF_TX_COMPLQ_CLEAN_BUDGET 256
#define IDPF_TX_MIN_PKT_LEN 17
#define IDPF_TX_DESCS_FOR_SKB_DATA_PTR 1
#define IDPF_TX_DESCS_PER_CACHE_LINE (L1_CACHE_BYTES / \
sizeof(struct idpf_flex_tx_desc))
#define IDPF_TX_DESCS_FOR_CTX 1
/* TX descriptors needed, worst case */
#define IDPF_TX_DESC_NEEDED (MAX_SKB_FRAGS + IDPF_TX_DESCS_FOR_CTX + \
IDPF_TX_DESCS_PER_CACHE_LINE + \
IDPF_TX_DESCS_FOR_SKB_DATA_PTR)
/* The size limit for a transmit buffer in a descriptor is (16K - 1).
* In order to align with the read requests we will align the value to
* the nearest 4K which represents our maximum read request size.
*/
#define IDPF_TX_MAX_READ_REQ_SIZE SZ_4K
#define IDPF_TX_MAX_DESC_DATA (SZ_16K - 1)
#define IDPF_TX_MAX_DESC_DATA_ALIGNED \
ALIGN_DOWN(IDPF_TX_MAX_DESC_DATA, IDPF_TX_MAX_READ_REQ_SIZE)
#define idpf_rx_buf libeth_fqe
#define IDPF_RX_MAX_PTYPE_PROTO_IDS 32
#define IDPF_RX_MAX_PTYPE_SZ (sizeof(struct virtchnl2_ptype) + \
(sizeof(u16) * IDPF_RX_MAX_PTYPE_PROTO_IDS))
#define IDPF_RX_PTYPE_HDR_SZ sizeof(struct virtchnl2_get_ptype_info)
#define IDPF_RX_MAX_PTYPES_PER_BUF \
DIV_ROUND_DOWN_ULL((IDPF_CTLQ_MAX_BUF_LEN - IDPF_RX_PTYPE_HDR_SZ), \
IDPF_RX_MAX_PTYPE_SZ)
#define IDPF_GET_PTYPE_SIZE(p) struct_size((p), proto_id, (p)->proto_id_count)
#define IDPF_TUN_IP_GRE (\
IDPF_PTYPE_TUNNEL_IP |\
IDPF_PTYPE_TUNNEL_IP_GRENAT)
#define IDPF_TUN_IP_GRE_MAC (\
IDPF_TUN_IP_GRE |\
IDPF_PTYPE_TUNNEL_IP_GRENAT_MAC)
#define IDPF_RX_MAX_PTYPE 1024
#define IDPF_RX_MAX_BASE_PTYPE 256
#define IDPF_INVALID_PTYPE_ID 0xFFFF
Annotation
- Immediate include surface: `linux/dim.h`, `net/libeth/cache.h`, `net/libeth/types.h`, `net/netdev_queues.h`, `net/tcp.h`, `net/xdp.h`, `idpf_lan_txrx.h`, `virtchnl2_lan_desc.h`.
- Detected declarations: `struct libeth_rq_napi_stats`, `struct idpf_tx_offload_params`, `struct idpf_tx_splitq_params`, `struct idpf_ptype_state`, `struct idpf_vec_regs`, `struct idpf_intr_reg`, `struct idpf_q_vector`, `struct idpf_rx_queue_stats`, `struct idpf_tx_queue_stats`, `struct idpf_rx_queue`.
- 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.