drivers/net/ethernet/intel/idpf/idpf.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/idpf/idpf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/idpf/idpf.h- Extension
.h- Size
- 33584 bytes
- Lines
- 1079
- 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.
- 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
net/pkt_sched.hlinux/aer.hlinux/etherdevice.hlinux/ioport.hlinux/pci.hlinux/bitfield.hlinux/sctp.hlinux/ethtool_netlink.hnet/gro.hlinux/net/intel/iidc_rdma.hlinux/net/intel/iidc_rdma_idpf.hvirtchnl2.hidpf_txrx.hidpf_controlq.h
Detected Declarations
struct idpf_adapterstruct idpf_vportstruct idpf_vport_max_qstruct idpf_q_vec_rsrcstruct idpf_rss_datastruct idpf_mac_filterstruct idpf_netdev_privstruct idpf_reset_regstruct idpf_vport_max_qstruct idpf_reg_opsstruct idpf_dev_opsstruct idpf_tstamp_statsstruct idpf_port_statsstruct idpf_fsteer_fltrstruct idpf_q_vec_rsrcstruct idpf_vportstruct idpf_rss_datastruct idpf_q_coalescestruct idpf_vport_user_config_datastruct idpf_avail_queue_infostruct idpf_vector_infostruct idpf_vector_lifostruct idpf_queue_id_reg_chunkstruct idpf_queue_id_reg_infostruct idpf_vport_configstruct idpf_vc_xn_managerstruct idpf_adapterenum idpf_stateenum idpf_flagsenum idpf_cap_fieldenum idpf_vport_stateenum idpf_vport_reset_causeenum idpf_vport_flagsenum idpf_user_flagsenum idpf_vport_config_flagsfunction idpf_is_queue_model_splitfunction idpf_xdp_enabledfunction idpf_is_rdma_cap_enafunction idpf_get_reserved_vecsfunction idpf_get_reserved_rdma_vecsfunction idpf_get_default_vportsfunction idpf_get_max_vportsfunction idpf_get_max_tx_bufsfunction idpf_get_min_tx_pkt_lenfunction idpf_is_reset_detectedfunction idpf_is_reset_in_progfunction idpf_is_feature_enafunction idpf_get_max_tx_hdr_size
Annotated Snippet
struct idpf_mac_filter {
struct list_head list;
u8 macaddr[ETH_ALEN];
bool remove;
bool add;
};
/**
* enum idpf_state - State machine to handle bring up
* @__IDPF_VER_CHECK: Negotiate virtchnl version
* @__IDPF_GET_CAPS: Negotiate capabilities
* @__IDPF_INIT_SW: Init based on given capabilities
* @__IDPF_STATE_LAST: Must be last, used to determine size
*/
enum idpf_state {
__IDPF_VER_CHECK,
__IDPF_GET_CAPS,
__IDPF_INIT_SW,
__IDPF_STATE_LAST,
};
/**
* enum idpf_flags - Hard reset causes.
* @IDPF_HR_FUNC_RESET: Hard reset when TxRx timeout
* @IDPF_HR_DRV_LOAD: Set on driver load for a clean HW
* @IDPF_HR_RESET_IN_PROG: Reset in progress
* @IDPF_REMOVE_IN_PROG: Driver remove in progress
* @IDPF_MB_INTR_MODE: Mailbox in interrupt mode
* @IDPF_VC_CORE_INIT: virtchnl core has been init
* @IDPF_FLAGS_NBITS: Must be last
*/
enum idpf_flags {
IDPF_HR_FUNC_RESET,
IDPF_HR_DRV_LOAD,
IDPF_HR_RESET_IN_PROG,
IDPF_REMOVE_IN_PROG,
IDPF_MB_INTR_MODE,
IDPF_VC_CORE_INIT,
IDPF_FLAGS_NBITS,
};
/**
* enum idpf_cap_field - Offsets into capabilities struct for specific caps
* @IDPF_BASE_CAPS: generic base capabilities
* @IDPF_CSUM_CAPS: checksum offload capabilities
* @IDPF_SEG_CAPS: segmentation offload capabilities
* @IDPF_RSS_CAPS: RSS offload capabilities
* @IDPF_HSPLIT_CAPS: Header split capabilities
* @IDPF_RSC_CAPS: RSC offload capabilities
* @IDPF_OTHER_CAPS: miscellaneous offloads
*
* Used when checking for a specific capability flag since different capability
* sets are not mutually exclusive numerically, the caller must specify which
* type of capability they are checking for.
*/
enum idpf_cap_field {
IDPF_BASE_CAPS = -1,
IDPF_CSUM_CAPS = offsetof(struct virtchnl2_get_capabilities,
csum_caps),
IDPF_SEG_CAPS = offsetof(struct virtchnl2_get_capabilities,
seg_caps),
IDPF_RSS_CAPS = offsetof(struct virtchnl2_get_capabilities,
rss_caps),
IDPF_HSPLIT_CAPS = offsetof(struct virtchnl2_get_capabilities,
hsplit_caps),
IDPF_RSC_CAPS = offsetof(struct virtchnl2_get_capabilities,
rsc_caps),
IDPF_OTHER_CAPS = offsetof(struct virtchnl2_get_capabilities,
other_caps),
};
/**
* enum idpf_vport_state - Current vport state
* @IDPF_VPORT_UP: Vport is up
* @IDPF_VPORT_STATE_NBITS: Must be last, number of states
*/
enum idpf_vport_state {
IDPF_VPORT_UP,
IDPF_VPORT_STATE_NBITS
};
/**
* struct idpf_netdev_priv - Struct to store vport back pointer
* @adapter: Adapter back pointer
* @vport: Vport back pointer
* @vport_id: Vport identifier
* @link_speed_mbps: Link speed in mbps
* @vport_idx: Relative vport index
* @max_tx_hdr_size: Max header length hardware can support
* @tx_max_bufs: Max buffers that can be transmitted with scatter-gather
Annotation
- Immediate include surface: `net/pkt_sched.h`, `linux/aer.h`, `linux/etherdevice.h`, `linux/ioport.h`, `linux/pci.h`, `linux/bitfield.h`, `linux/sctp.h`, `linux/ethtool_netlink.h`.
- Detected declarations: `struct idpf_adapter`, `struct idpf_vport`, `struct idpf_vport_max_q`, `struct idpf_q_vec_rsrc`, `struct idpf_rss_data`, `struct idpf_mac_filter`, `struct idpf_netdev_priv`, `struct idpf_reset_reg`, `struct idpf_vport_max_q`, `struct idpf_reg_ops`.
- 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.
- 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.