STRUCT PCI_DOE_MB(9)
okay bestie, so we're deep in the Kernel API Manual today and the page is struct pci_doe_mb(9). it's giving "small struct, big responsibilities" and honestly? obsessed. let's get into it π«Ά
π NAME π
struct pci_doe_mb β the state for a single DOE mailbox. one mailbox, one struct, no sharing, no cap π
β¨ SYNOPSIS β¨
struct pci_doe_mb {
struct pci_dev *pdev;
u16 cap_offset;
struct xarray feats;
wait_queue_head_t wq;
struct workqueue_struct *work_queue;
unsigned long flags;
#ifdef CONFIG_SYSFS;
struct device_attribute *sysfs_attrs;
#endif;
};
like, look at her. iconic layout. note the #ifdef CONFIG_SYSFS; in there β yes, that's conditional, and yes, you gotta respect it πΈ
π Members π
okay so every single field, one by one, no skipping, we're doing the full tour π§
pdevβ the PCI device that this mailbox belongs to. her home. her origin story πcap_offsetβ the capability offset. the coordinates of where the magic lives β¨featsβ array of the features that are supported, encoded aslongvalues. like a little roster of what she can do πwqβ wait queue for the work item. she queues, she waits, she slays π¦work_queueβ the queue ofpci_doe_workitems. it's literally a queue of work, main character energy π₯flagsβ a bit array ofPCI_DOE_FLAG_*flags. bit array!! bit array!! πsysfs_attrsβ array of sysfs device attributes. (this one's chillin' behindCONFIG_SYSFS, iykyk) πΈ
π DESCRIPTION π
so this state is what manages a single DOE mailbox capability. one struct, one capability, that's the whole vibe.
and here's the thing, bestie β listen closely: all fields should be considered opaque to the consumers. literally all of them. don't go poking at her internals, don't try to be cute with it, that's not the assignment π
how it actually works: the structure gets created by pci_doe_create_mb, and then you pass it into the helpers below. that's it. that's the flow. chef's kiss π
ngl, "opaque" is doing a lot of heavy lifting in that sentence. respect it. do not reach into the struct. fr fr π
π¦ SEE ALSO π¦
the whole friend group, keep them close, they're all linked π:
- Kernel file
./drivers/pci/doe.c struct pci_doe_task(9)pci_doe_create_mb(9)pci_doe_destroy_mb(9)pci_doe_supports_feat(9)pci_doe_submit_task(9)pci_doe(9)pci_find_doe_mailbox(9)
and that's the page, bestie π this whole thing lives over in ./drivers/pci, it's dated October 2026, and it's part of the Kernel API Manual. go forth, treat the struct as opaque, and 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