STRUCT SIENA_VF(9)
πΈ struct siena_vf (9) β Kernel API Manual πΈ
okay so bestie, welcome to the struct siena_vf page π
this is the kernel API manual's take on Back-end resource and protocol state for a PCI VF β and yes, that's a lot of words, but like, it's literally just the big ol' state bag for one Virtual Function. let's get into it π«Ά
β¨ NAME β¨
struct siena_vf β the back-end resource + protocol state for a PCI VF. that's it, that's the whole vibe π
π SYNOPSIS π
struct siena_vf {
struct efx_nic *efx;
unsigned int pci_rid;
char pci_name[13];
unsigned int index;
struct work_struct req;
u64 req_addr;
int req_type;
unsigned req_seqno;
unsigned msg_seqno;
bool busy;
struct efx_buffer buf;
unsigned buftbl_base;
bool rx_filtering;
enum efx_filter_flags rx_filter_flags;
unsigned rx_filter_qid;
int rx_filter_id;
enum efx_vf_tx_filter_mode tx_filter_mode;
int tx_filter_id;
struct vfdi_endpoint addr;
u64 status_addr;
struct mutex status_lock;
u64 *peer_page_addrs;
unsigned peer_page_count;
u64 evq0_addrs[EFX_MAX_VF_EVQ_SIZE * sizeof(efx_qword_t) /
EFX_BUF_SIZE];
unsigned evq0_count;
wait_queue_head_t flush_waitq;
struct mutex txq_lock;
unsigned long txq_mask[VI_MASK_LENGTH];
unsigned txq_count;
unsigned long rxq_mask[VI_MASK_LENGTH];
unsigned rxq_count;
unsigned long rxq_retry_mask[VI_MASK_LENGTH];
atomic_t rxq_retry_count;
struct work_struct reset_work;
};
like, she's thicc. and now the member-by-member tour π
π Members π
efxβ theEfx NICowning this VF. the main character it belongs to β¨pci_ridβ the PCI requester ID for this VF.pci_nameβ the PCI name (formatted address) of this VF.indexβ index of the VF within its port and PF.reqβ the VFDI incoming request work item. so here's the tea: incomingUSR_EVevents get received by the NAPI handler, but they must be handled by executing MCDI requests inside a work item. can't just do it inline, obviously πreq_addrβ VFDI incoming request DMA address (in the VF's PCI address space).req_typeβ expected next incoming (from VF)VFDI_EV_TYPEmember.req_seqnoβ expected next incoming (from VF)VFDI_EV_SEQmember.msg_seqnoβ nextVFDI_EV_SEQmember to reply to VF. protected bystatus_lockπbusyβ VFDI request queued to be processed or being processed. and bestie, receiving a VFDI request whenbusyis set is an error condition π so don't do that.bufβ incoming VFDI requests are DMA from the VF into this buffer.buftbl_baseβ buffer table entries for this VF start at this index.rx_filteringβ receive filtering has been requested by the VF driver.rx_filter_flagsβ the flags sent in theVFDI_OP_INSERT_FILTERrequest.rx_filter_qidβ VF relative qid for RX filter requested by VF.rx_filter_idβ receive MAC filter ID. only one filter per VF is supported, so don't get greedy πtx_filter_modeβ transmit MAC filtering mode.tx_filter_idβ transmit MAC filter ID.addrβ the MAC address and outer vlan tag of the VF.status_addrβ VF DMA address of page forstruct vfdi_statusupdates.status_lockβ mutex protectingmsg_seqno,status_addr,addr,peer_page_addrsandpeer_page_countfrom simultaneous updates by the VM and consumption byefx_siena_sriov_update_vf_addr. it's giving traffic controller energy π¦peer_page_addrsβ pointer to an array of guest pages for local addresses.peer_page_countβ number of entries inpeer_page_count. (yes, fr fr, that's what it says π)evq0_addrsβ array of guest pages backingevq0.evq0_countβ number of entries inevq0_addrs.flush_waitqβ wait queue used byVFDI_OP_FINI_ALL_QUEUEShandler to wait for flush completions.txq_lockβ mutex for TX queue allocation.txq_maskβ mask of initialized transmit queues.txq_countβ number of initialized transmit queues.rxq_maskβ mask of initialized receive queues.rxq_countβ number of initialized receive queues.rxq_retry_maskβ mask or receive queues that need to be flushed again due to flush failure. lowkey the "oops we run it back" list πrxq_retry_countβ number of receive queues inrxq_retry_mask.reset_workβ work item to schedule a VF reset. the dramatic reset button π₯
π¦ SEE ALSO π¦
- kernel file
./drivers/net/ethernet/sfc/siena/siena_sriov.c enum efx_vf_tx_filter_mode(9)struct efx_local_addr(9)struct efx_endpoint_page(9)
go read those next, iykyk π«
ok that's the whole page bestie, every single member accounted for, no cap π§
and that's a wrap, cuties β this one came from ./drivers/net/ethernet/sfc/siena and it's dated October 2026, so like, a little time-travel moment β slay π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms