STRUCT CDX_MCDI_IFACE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct cdx_mcdi_iface(9) β€” the MCDI protocol context, explained

okay so bestie, welcome to the Kernel API Manual page for struct cdx_mcdi_iface ✨ this is the little home where the MCDI protocol context lives, and honestly? it's giving main character energy in the CDX world πŸ’…


🌸 NAME

struct cdx_mcdi_iface β€” the MCDI protocol context πŸŽ€

like, this struct is the vibe where all your MCDI state hangs out. periodt.


✨ SYNOPSIS

struct cdx_mcdi_iface {
    struct cdx_mcdi *cdx;
    struct mutex iface_lock;
    unsigned int outstanding_cleanups;
    struct list_head cmd_list;
    struct workqueue_struct *workqueue;
    wait_queue_head_t cmd_complete_wq;
    struct cdx_mcdi_cmd *db_held_by;
    struct cdx_mcdi_cmd *seq_held_by[16];
    unsigned int prev_handle;
    enum cdx_mcdi_mode mode;
    u8 prev_seq;
    bool new_epoch;
 };

no cap, that's the whole shape of it πŸ’–


🫢 Members (the whole cast, no one gets left out)

  • cdx β€” the associated NIC πŸ’» like, the network interface this whole thing is attached to.
  • iface_lock β€” serialise access to this structure πŸ”’ literally the bouncer at the door, one at a time please.
  • outstanding_cleanups β€” count of cleanups 🧹 keeping track of how many cleanups are still outstanding.
  • cmd_list β€” list of outstanding and running commands πŸ“‹ both the ones in flight and the ones still waiting, all in one list.
  • workqueue β€” workqueue used for delayed processing ⏳ the place where delayed work gets handled.
  • cmd_complete_wq β€” waitqueue for command completion 😴 you sit here and wait until your command is done.
  • db_held_by β€” the command the MC doorbell is in use by πŸ”” whoever's holding the doorbell right now.
  • seq_held_by β€” the command each sequence number is in use by πŸ”’ an array where each slot says which command is using that sequence number.
  • prev_handle β€” the last used command handle 🏷️ the handle that got used most recently.
  • mode β€” poll for mcdi completion, or wait for an mcdi_event πŸ‘€ two whole lifestyles: you either poll, or you wait for the event. choose your fighter.
  • prev_seq β€” the last used sequence number πŸ” same energy as prev_handle, but for sequences.
  • new_epoch β€” indicates start of day or start of MC reboot recovery πŸŒ… a fresh start β€” either the beginning of a day or the beginning of MC reboot recovery. iconic either way.

πŸ‘‘ SEE ALSO

  • Kernel file ./include/linux/cdx/mcdi.h
  • enum cdx_mcdi_mode(9)
  • enum cdx_mcdi_cmd_state(9)
  • struct cdx_mcdi(9)
  • struct cdx_mcdi_cmd(9)
  • struct cdx_mcdi_data(9)

go read those next, bestie, iykyk 🧚


heads up glampire: this page is filed under ./include/linux/cdx and it's dated October 2026 β€” that's the source and the version/date, so don't @ me when you're citing it πŸ’…

and that's the whole page β€” struct cdx_mcdi_iface(9) from the Kernel API Manual, source ./include/linux/cdx, October 2026. slay πŸŽ€β­πŸ”₯

πŸ“¦ where this page comes from