STRUCT VFDI_REQ(9)
π struct vfdi_req(9) π
okay bestie, welcome to the Kernel API Manual β¨ β yes that's the whole manual name, we're fancy here. This page is all about struct vfdi_req, and no cap, it's a whole vibe.
πΈ NAME πΈ
struct vfdi_req β literally the request that goes from the VF driver to the PF driver π«Ά
β¨ SYNOPSIS β¨
struct vfdi_req {
u32 op;
u32 reserved1;
s32 rc;
u32 reserved2;
union {
struct {
u32 index;
u32 buf_count;
u64 addr[];
} init_evq;
struct {
u32 index;
u32 buf_count;
u32 evq;
u32 label;
u32 flags;
#define VFDI_RXQ_FLAG_SCATTER_EN 1;
u32 reserved;
u64 addr[];
} init_rxq;
struct {
u32 index;
u32 buf_count;
u32 evq;
u32 label;
u32 flags;
#define VFDI_TXQ_FLAG_IP_CSUM_DIS 1;
#define VFDI_TXQ_FLAG_TCPUDP_CSUM_DIS 2;
u32 reserved;
u64 addr[];
} init_txq;
struct {
u32 rxq;
u32 flags;
#define VFDI_MAC_FILTER_FLAG_RSS 1;
#define VFDI_MAC_FILTER_FLAG_SCATTER 2;
} mac_filter;
struct {
u64 dma_addr;
u64 peer_page_count;
u64 peer_page_addr[];
} set_status_page;
} u;
};
it's giving "one struct to rule them all" π β everything lives inside that big union u, so it's a pick-one-situation, iykyk π
π Members π
opβ the operation code or response indicator, taken straight fromenum vfdi_opβ¨rcβ the response code. set it to0when it slayed (success), or a negative error code when it did not π
π¦ the init_evq branch π¦
u.init_evq.indexβ which event queue to create, by indexu.init_evq.buf_countβ how many4kbuffers are backing that event queueu.init_evq.addrβ array of lengthu.init_evq.buf_count, holding the DMA address of every page backing the event queue π«Ά
π the init_rxq branch π
u.init_rxq.indexβ which receive queue to create, by indexu.init_rxq.buf_countβ how many4kbuffers are backing the receive queueu.init_rxq.evqβ the instance of the event queue you want receive events aimed at π―u.init_rxq.labelβ the label that shows up in receive eventsu.init_rxq.flagsβ unused (yes, really, it's just sitting there being decorative π)u.init_rxq.addrβ array of lengthu.init_rxq.buf_countwith the DMA address of each page backing the receive queue
π₯ the init_txq branch π₯
u.init_txq.indexβ which transmit queue to create, by indexu.init_txq.buf_countβ how many4kbuffers are backing the transmit queueu.init_txq.evqβ the instance of the event queue to target transmit completion events at π―u.init_txq.labelβ the label used in transmit completion eventsu.init_txq.flagsβ checksum offload flags, and the relevant macros areVFDI_TXQ_FLAG_IP_CSUM_DISandVFDI_TXQ_FLAG_TCPUDP_CSUM_DISβ¨u.init_txq.addrβ array of lengthu.init_txq.buf_countwith the DMA address of each page backing the transmit queue
π the mac_filter branch π
u.mac_filter.rxqβ inserts a MAC filter at the VF local address / VLAN, targeting all traffic at this receive queueu.mac_filter.flagsβ the MAC filter flags themselves (VFDI_MAC_FILTER_FLAG_RSSandVFDI_MAC_FILTER_FLAG_SCATTERare the macros in play here) π
β the set_status_page branch β
u.set_status_page.dma_addrβ base address for thestruct vfdi_status. this one must be page-aligned, and heads up: the PF may write up to a whole page (that's them allowing for the structure getting extended, bestie) πu.set_status_page.peer_page_countβ how many additional pages the VF has handed over, which peer addresses may be DMAd intou.set_status_page.peer_page_addrβ array of DMA addresses of those pages. and listen: if the number of peers exceeds256, then the VF must provide additional pages in this array. the PF will then DMA up to512vfdi_endpointstructures into each page. these addresses must be page-aligned too π«Ά
fr fr on the page-alignment thing β bothdma_addrand everypeer_page_addrentry. not the place to be sloppy π
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/sfc/siena/vfdi.hVirtual Function Driver Interface(9) enum vfdi_op(9)struct vfdi_status(9)
and that's the whole page, bestie π source lives in ./drivers/net/ethernet/sfc/siena, dated October 2026, and it's struct vfdi_req(9) til the end. periodt π
β¨
π¦ 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