drivers/net/ethernet/intel/idpf/virtchnl2.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/idpf/virtchnl2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/idpf/virtchnl2.h- Extension
.h- Size
- 63842 bytes
- Lines
- 1820
- 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
linux/if_ether.h
Detected Declarations
struct virtchnl2_edt_capsstruct virtchnl2_version_infostruct virtchnl2_get_capabilitiesstruct virtchnl2_queue_reg_chunkstruct virtchnl2_queue_reg_chunksstruct virtchnl2_create_vportstruct virtchnl2_vportstruct virtchnl2_txq_infostruct virtchnl2_config_tx_queuesstruct virtchnl2_rxq_infostruct virtchnl2_config_rx_queuesstruct virtchnl2_add_queuesstruct virtchnl2_vector_chunkstruct virtchnl2_vector_chunksstruct virtchnl2_alloc_vectorsstruct virtchnl2_rss_lutstruct virtchnl2_rss_hashstruct virtchnl2_sriov_vfs_infostruct virtchnl2_ptypestruct virtchnl2_get_ptype_infostruct virtchnl2_vport_statsstruct virtchnl2_eventstruct virtchnl2_rss_keystruct virtchnl2_queue_chunkstruct virtchnl2_queue_chunksstruct virtchnl2_del_ena_dis_queuesstruct virtchnl2_queue_vectorstruct virtchnl2_queue_vector_mapsstruct virtchnl2_loopbackstruct virtchnl2_mac_addrstruct virtchnl2_mac_addr_liststruct virtchnl2_promisc_infostruct virtchnl2_ptp_clk_reg_offsetsstruct virtchnl2_ptp_cross_time_reg_offsetsstruct virtchnl2_ptp_clk_adj_reg_offsetsstruct virtchnl2_ptp_tx_tstamp_latch_capsstruct virtchnl2_ptp_get_vport_tx_tstamp_capsstruct virtchnl2_ptp_get_capsstruct virtchnl2_ptp_tx_tstamp_latchstruct virtchnl2_ptp_get_vport_tx_tstamp_latchesstruct virtchnl2_ptp_get_dev_clk_timestruct virtchnl2_ptp_get_cross_timestruct virtchnl2_ptp_set_dev_clk_timestruct virtchnl2_ptp_adj_dev_clk_finestruct virtchnl2_ptp_adj_dev_clk_timestruct virtchnl2_mem_regionstruct virtchnl2_get_lan_memory_regionsstruct virtchnl2_proto_hdr
Annotated Snippet
struct virtchnl2_edt_caps {
__le64 tstamp_granularity_ns;
__le64 time_horizon_ns;
};
VIRTCHNL2_CHECK_STRUCT_LEN(16, virtchnl2_edt_caps);
/**
* struct virtchnl2_version_info - Version information.
* @major: Major version.
* @minor: Minor version.
*
* PF/VF posts its version number to the CP. CP responds with its version number
* in the same format, along with a return code.
* If there is a major version mismatch, then the PF/VF cannot operate.
* If there is a minor version mismatch, then the PF/VF can operate but should
* add a warning to the system log.
*
* This version opcode MUST always be specified as == 1, regardless of other
* changes in the API. The CP must always respond to this message without
* error regardless of version mismatch.
*
* Associated with VIRTCHNL2_OP_VERSION.
*/
struct virtchnl2_version_info {
__le32 major;
__le32 minor;
};
VIRTCHNL2_CHECK_STRUCT_LEN(8, virtchnl2_version_info);
/**
* struct virtchnl2_get_capabilities - Capabilities info.
* @csum_caps: See enum virtchnl2_cap_txrx_csum.
* @seg_caps: See enum virtchnl2_cap_seg.
* @hsplit_caps: See enum virtchnl2_cap_rx_hsplit_at.
* @rsc_caps: See enum virtchnl2_cap_rsc.
* @rss_caps: See enum virtchnl2_flow_types.
* @other_caps: See enum virtchnl2_cap_other.
* @mailbox_dyn_ctl: DYN_CTL register offset and vector id for mailbox
* provided by CP.
* @mailbox_vector_id: Mailbox vector id.
* @num_allocated_vectors: Maximum number of allocated vectors for the device.
* @max_rx_q: Maximum number of supported Rx queues.
* @max_tx_q: Maximum number of supported Tx queues.
* @max_rx_bufq: Maximum number of supported buffer queues.
* @max_tx_complq: Maximum number of supported completion queues.
* @max_sriov_vfs: The PF sends the maximum VFs it is requesting. The CP
* responds with the maximum VFs granted.
* @max_vports: Maximum number of vports that can be supported.
* @default_num_vports: Default number of vports driver should allocate on load.
* @max_tx_hdr_size: Max header length hardware can parse/checksum, in bytes.
* @max_sg_bufs_per_tx_pkt: Max number of scatter gather buffers that can be
* sent per transmit packet without needing to be
* linearized.
* @pad: Padding.
* @reserved: Reserved.
* @device_type: See enum virtchl2_device_type.
* @min_sso_packet_len: Min packet length supported by device for single
* segment offload.
* @max_hdr_buf_per_lso: Max number of header buffers that can be used for
* an LSO.
* @num_rdma_allocated_vectors: Maximum number of allocated RDMA vectors for
* the device.
* @pad1: Padding for future extensions.
*
* Dataplane driver sends this message to CP to negotiate capabilities and
* provides a virtchnl2_get_capabilities structure with its desired
* capabilities, max_sriov_vfs and num_allocated_vectors.
* CP responds with a virtchnl2_get_capabilities structure updated
* with allowed capabilities and the other fields as below.
* If PF sets max_sriov_vfs as 0, CP will respond with max number of VFs
* that can be created by this PF. For any other value 'n', CP responds
* with max_sriov_vfs set to min(n, x) where x is the max number of VFs
* allowed by CP's policy. max_sriov_vfs is not applicable for VFs.
* If dataplane driver sets num_allocated_vectors as 0, CP will respond with 1
* which is default vector associated with the default mailbox. For any other
* value 'n', CP responds with a value <= n based on the CP's policy of
* max number of vectors for a PF.
* CP will respond with the vector ID of mailbox allocated to the PF in
* mailbox_vector_id and the number of itr index registers in itr_idx_map.
* It also responds with default number of vports that the dataplane driver
* should comeup with in default_num_vports and maximum number of vports that
* can be supported in max_vports.
*
* Associated with VIRTCHNL2_OP_GET_CAPS.
*/
struct virtchnl2_get_capabilities {
__le32 csum_caps;
__le32 seg_caps;
__le32 hsplit_caps;
__le32 rsc_caps;
Annotation
- Immediate include surface: `linux/if_ether.h`.
- Detected declarations: `struct virtchnl2_edt_caps`, `struct virtchnl2_version_info`, `struct virtchnl2_get_capabilities`, `struct virtchnl2_queue_reg_chunk`, `struct virtchnl2_queue_reg_chunks`, `struct virtchnl2_create_vport`, `struct virtchnl2_vport`, `struct virtchnl2_txq_info`, `struct virtchnl2_config_tx_queues`, `struct virtchnl2_rxq_info`.
- 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.