STRUCT EFX_MCDI_IFACE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct efx_mcdi_iface(9) β€” like, the whole MCDI protocol context, bestie

okay so this is a page straight out of the Kernel API Manual, and it's all about struct efx_mcdi_iface, aka the MCDI protocol context. no cap, it's giving "the little control room where all the MCDI traffic gets its life together" πŸŽ€


✨ NAME ✨

struct efx_mcdi_iface β€” MCDI protocol context πŸ¦‹


🌸 SYNOPSIS 🌸

struct efx_mcdi_iface {
    struct efx_nic *efx;
    enum efx_mcdi_state state;
    enum efx_mcdi_mode mode;
    wait_queue_head_t wq;
    spinlock_t iface_lock;
    bool new_epoch;
    unsigned int credits;
    unsigned int seqno;
    int resprc;
    int resprc_raw;
    size_t resp_hdr_len;
    size_t resp_data_len;
    spinlock_t async_lock;
    struct list_head async_list;
    struct timer_list async_timer;
  #ifdef CONFIG_SFC_SIENA_MCDI_LOGGING;
    char *logging_buffer;
    bool logging_enabled;
  #endif;
    unsigned int proxy_rx_handle;
    int proxy_rx_status;
    wait_queue_head_t proxy_rx_wq;
 };

like, yes, that's the whole struct, character for character, we do not skip members in this group chat πŸ’–


🧚 Members 🧚

  • efx β€” the NIC this whole thing is attached to, its lil bestie 🫢
  • state β€” the request handling state. wq waits on this one, so it's kind of the main character here ✨
  • mode β€” decides the vibe: poll for an mcdi completion, or wait for an mcdi_event πŸ‘‘
  • wq β€” the wait queue for threads that are sitting around waiting for state != MCDI_STATE_RUNNING 😭
  • iface_lock β€” serialises access to seqno, credits and the response metadata. one at a time, babe, no shoving πŸ’…
  • new_epoch β€” flags the start of day, or the start of MC reboot recovery πŸŒ…
  • credits β€” how many spurious MCDI completion events we'll tolerate before we trigger a fatal error πŸ’€ like, there is a limit
  • seqno β€” the next sequence number to use for mcdi requests, keeping everything in order fr fr
  • resprc β€” response error/success code (Linux numbering) πŸ“
  • resp_hdr_len β€” response header length
  • resp_data_len β€” response data (SDU or error) length
  • async_lock β€” serialises access to async_list while event processing is enabled πŸ”’
  • async_list β€” the queue of asynchronous requests, lined up like it's a queue for a pop-up 🌈
  • async_timer β€” timer for asynchronous request timeout ⏰
  • logging_buffer β€” a buffer that may be used to build MCDI tracing messages; lowkey the journal πŸ““
  • logging_enabled β€” whether to trace MCDI. on or off, that's the whole question πŸ¦‹
  • proxy_rx_handle β€” the most recently received proxy authorisation handle πŸŽ€
  • proxy_rx_status β€” status of the most recent proxy authorisation ⭐
  • proxy_rx_wq β€” wait queue for updates to proxy_rx_handle 🫢

πŸŽ€ SEE ALSO πŸŽ€

  • Kernel file ./drivers/net/ethernet/sfc/siena/mcdi.h enum
  • efx_mcdi_state(9)
  • efx_mcdi_mode(9)
  • struct efx_mcdi_data(9)

and that's the tea β˜• this iconic lil page lives in ./drivers/net/ethernet/sfc/siena, dated October 2026, and it's literally titled struct efx_mcdi_iface(9) β€” go read the source bestie, iykyk πŸ’œπŸŒΈ

πŸ“¦ where this page comes from