STRUCT SIENA_VF(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 β€” the Efx NIC owning 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: incoming USR_EV events 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_TYPE member.
  • req_seqno β€” expected next incoming (from VF) VFDI_EV_SEQ member.
  • msg_seqno β€” next VFDI_EV_SEQ member to reply to VF. protected by status_lock πŸ”’
  • busy β€” VFDI request queued to be processed or being processed. and bestie, receiving a VFDI request when busy is 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 the VFDI_OP_INSERT_FILTER request.
  • 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 for struct vfdi_status updates.
  • status_lock β€” mutex protecting msg_seqno, status_addr, addr, peer_page_addrs and peer_page_count from simultaneous updates by the VM and consumption by efx_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 in peer_page_count. (yes, fr fr, that's what it says 😭)
  • evq0_addrs β€” array of guest pages backing evq0.
  • evq0_count β€” number of entries in evq0_addrs.
  • flush_waitq β€” wait queue used by VFDI_OP_FINI_ALL_QUEUES handler 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 in rxq_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