drivers/net/ethernet/intel/idpf/idpf_virtchnl.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/idpf/idpf_virtchnl.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/idpf/idpf_virtchnl.h- Extension
.h- Size
- 8426 bytes
- Lines
- 223
- 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
virtchnl2.h
Detected Declarations
struct idpf_vc_xnstruct idpf_vc_xnstruct idpf_vc_xn_paramsstruct idpf_adapterstruct idpf_netdev_privstruct idpf_vec_regsstruct idpf_vportstruct idpf_vport_max_qstruct idpf_vport_configstruct idpf_vport_user_config_datastruct idpf_queue_ptrstruct idpf_queue_setenum idpf_vc_xn_statefunction idpf_vport_deinit_queue_reg_chunks
Annotated Snippet
struct idpf_vc_xn {
struct completion completed;
spinlock_t lock;
enum idpf_vc_xn_state state;
size_t reply_sz;
struct kvec reply;
async_vc_cb async_handler;
u32 vc_op;
u8 idx;
u8 salt;
};
/**
* struct idpf_vc_xn_params - Parameters for executing transaction
* @send_buf: kvec for send buffer
* @recv_buf: kvec for recv buffer, may be NULL, must then have zero length
* @timeout_ms: timeout to wait for reply
* @async: send message asynchronously, will not wait on completion
* @async_handler: If sent asynchronously, optional callback handler. The user
* must be careful when using async handlers as the memory for
* the recv_buf _cannot_ be on stack if this is async.
* @vc_op: virtchnl op to send
*/
struct idpf_vc_xn_params {
struct kvec send_buf;
struct kvec recv_buf;
int timeout_ms;
bool async;
async_vc_cb async_handler;
u32 vc_op;
};
struct idpf_adapter;
struct idpf_netdev_priv;
struct idpf_vec_regs;
struct idpf_vport;
struct idpf_vport_max_q;
struct idpf_vport_config;
struct idpf_vport_user_config_data;
ssize_t idpf_vc_xn_exec(struct idpf_adapter *adapter,
const struct idpf_vc_xn_params *params);
int idpf_init_dflt_mbx(struct idpf_adapter *adapter);
void idpf_deinit_dflt_mbx(struct idpf_adapter *adapter);
int idpf_vc_core_init(struct idpf_adapter *adapter);
void idpf_vc_core_deinit(struct idpf_adapter *adapter);
int idpf_get_reg_intr_vecs(struct idpf_adapter *adapter,
struct idpf_vec_regs *reg_vals);
int idpf_queue_reg_init(struct idpf_vport *vport,
struct idpf_q_vec_rsrc *rsrc,
struct idpf_queue_id_reg_info *chunks);
int idpf_vport_queue_ids_init(struct idpf_vport *vport,
struct idpf_q_vec_rsrc *rsrc,
struct idpf_queue_id_reg_info *chunks);
static inline void
idpf_vport_deinit_queue_reg_chunks(struct idpf_vport_config *vport_cfg)
{
kfree(vport_cfg->qid_reg_info.queue_chunks);
vport_cfg->qid_reg_info.queue_chunks = NULL;
}
bool idpf_vport_is_cap_ena(struct idpf_vport *vport, u16 flag);
bool idpf_sideband_flow_type_ena(struct idpf_vport *vport, u32 flow_type);
bool idpf_sideband_action_ena(struct idpf_vport *vport,
struct ethtool_rx_flow_spec *fsp);
unsigned int idpf_fsteer_max_rules(struct idpf_vport *vport);
int idpf_recv_mb_msg(struct idpf_adapter *adapter, struct idpf_ctlq_info *arq);
int idpf_send_mb_msg(struct idpf_adapter *adapter, struct idpf_ctlq_info *asq,
u32 op, u16 msg_size, u8 *msg, u16 cookie);
struct idpf_queue_ptr {
enum virtchnl2_queue_type type;
union {
struct idpf_rx_queue *rxq;
struct idpf_tx_queue *txq;
struct idpf_buf_queue *bufq;
struct idpf_compl_queue *complq;
};
};
struct idpf_queue_set {
struct idpf_adapter *adapter;
struct idpf_q_vec_rsrc *qv_rsrc;
u32 vport_id;
u32 num;
struct idpf_queue_ptr qs[] __counted_by(num);
};
Annotation
- Immediate include surface: `virtchnl2.h`.
- Detected declarations: `struct idpf_vc_xn`, `struct idpf_vc_xn`, `struct idpf_vc_xn_params`, `struct idpf_adapter`, `struct idpf_netdev_priv`, `struct idpf_vec_regs`, `struct idpf_vport`, `struct idpf_vport_max_q`, `struct idpf_vport_config`, `struct idpf_vport_user_config_data`.
- 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.