epf_ntb_configure_msix(9)
π epf_ntb_configure_msix β from the Kernel API Manual, bestie π
ok so picture this: you're deep in the kernel, specifically in the Kernel API Manual, and you've found epf_ntb_configure_msix. Buckle up, she's a baddie with a job to do. β¨
πΈ NAME πΈ
epf_ntb_configure_msix β literally maps the OB address space over to the MSI-X address. that's the whole vibe. π«
β¨ SYNOPSIS β¨
int epf_ntb_configure_msix (struct epf_ntb *ntb , enum
pci_epc_interface_type type , u16 db_count );
three args, no drama, we love to see it π«Ά
π ARGUMENTS π
ntbβ the NTB device doing the whole "let HOST1 and HOST2 talk to each other" thing. she's the main character of this friendship π₯typeβ which interface we're on:PRIMARYinterface orSECONDARYinterface. pick your lane, queen πdb_countβ how many doorbell interrupts you want mapped. yes, number of doorbells. iykyk π
π¦ DESCRIPTION π¦
ok so here's the diagram, and ngl it's giving "abstract art in a museum" but i promise it's useful. drink some water first:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BAR0 Doorbell 1 +-----------> MSI-X ADDRESS 1 β
β BAR1 Doorbell 2 +-----------------+ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| BAR2 | | Doorbell 3 +-------+ |
+-----------------+ | BAR3 | | | Doorbell 4
+-----+ | +-----------------+ | BAR4 | | |
| | | +-----------------+ | BAR5 | | |
| | +-----------------+ EP CONTROLLER 1 |
| | +-----------------+ | | +---->+ MSI-X
ADDRESS 4 | (A) EP CONTROLLER 2 | |
(OB SPACE) | | | MW1 | |
| | | (B) +-----------------+ | | |
| | | | | | | PCI
Address Space (Managed by HOST2)
so epf_ntb_configure_msix handles stage (B) in that diagram up there (peep Doorbell 1, Doorbell 2, Doorbell 3, Doorbell 4). in human words: she maps the OB address space that corresponds to the doorbell over to the MSI-X address in the PCI address space. periodt. π
this operation needs 3 parameters:
- the address reserved for the doorbell in the outbound address space
- the MSI-X address in the PCIe Address space
- the number of MSI-X interrupts that have to be configured
the address in the outbound address space (for the Doorbell) lives in the epf_bar corresponding to BAR_DB_MW1 of epf_ntb_epc that's connected to HOST1. that gets populated in epf_ntb_alloc_peer_mem in this driver, right alongside the address for MW1. like they're holding hands π«Ά
the MSI-X address is chilling in the MSI-X table of EP CONTROLLER 2, and the count of doorbells is in ctrl->argument of epf_ntb_epc that's connected to HOST2. the MSI-X table is stored memory mapped to ntb_epc->msix_bar, and the offset lives in ntb_epc->msix_table_offset. from all that, epf_ntb_configure_msix pulls out the MSI-X address and data. she's thorough π€
she also stores the MSI-X data to raise each interrupt intodb_dataof the peer's control region. that's the whole point: it helps the peer raise the doorbell of the other host by writingdb_datato the BAR corresponding toBAR_DB_MW1. teamwork makes the dream work π
π SEE ALSO π
kernel file ./drivers/pci/endpoint/functions/pci-epf-ntb.c β the icon herself π
and the whole friend group, no one gets left out:
epf_ntb_link_up(9)epf_ntb_configure_mw(9)epf_ntb_teardown_mw(9)epf_ntb_configure_msi(9)epf_ntb_configure_db(9)epf_ntb_teardown_db(9)epf_ntb_cmd_handler(9)epf_ntb_peer_spad_bar_clear(9)epf_ntb_peer_spad_bar_set(9)epf_ntb_config_sspad_bar_clear(9)epf_ntb_config_sspad_bar_set(9)epf_ntb_config_spad_bar_free(9)epf_ntb_config_spad_bar_alloc(9)epf_ntb_config_spad_bar_alloc_interface(9)epf_ntb_free_peer_mem(9)epf_ntb_db_mw_bar_clear(9)epf_ntb_db_mw_bar_cleanup(9)epf_ntb_configure_interrupt(9)epf_ntb_alloc_peer_mem(9)epf_ntb_db_mw_bar_init(9)epf_ntb_epc_create_interface(9)epf_ntb_epc_create(9)epf_ntb_init_epc_bar_interface(9)epf_ntb_init_epc_bar(9)epf_ntb_epc_init_interface(9)epf_ntb_epc_cleanup_interface(9)epf_ntb_epc_cleanup(9)epf_ntb_epc_init(9)epf_ntb_bind(9)epf_ntb_unbind(9)epf_ntb_add_cfs(9)epf_ntb_probe(9)
aaaand that's the page, bestie!! π straight from ./drivers/pci/endpoint/functions, dated October 2026 β mwah, go touch some grass, then come back and read your MSI-X tables ππ§
π¦ 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