epf_ntb_peer_spad_bar_set(9)
π epf_ntb_peer_spad_bar_set π
okay so real quick, bestie β this is a page from the Kernel API Manual, section 9, and it's all about epf_ntb_peer_spad_bar_set. no cap, it's niche but it's iconic.
β¨ NAME β¨
epf_ntb_peer_spad_bar_set β literally just Set peer scratchpad BAR. that's the whole vibe. π
πΈ SYNOPSIS πΈ
int epf_ntb_peer_spad_bar_set (struct epf_ntb *ntb , enum
pci_epc_interface_type type );
π¦ ARGUMENTS π¦
ntbβ the NTB device that facilitates communication between HOST1 and HOST2. she's the matchmaker fr fr π«ΆtypeβPRIMARYinterface orSECONDARYinterface. pick your fighter π
π₯ DESCRIPTION π₯
ok so picture this. here's the layout, and yes i'm showing you the diagram because it ate:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BAR0 CONFIG REGION BAR0 β
β BAR1 SCRATCHPAD REGION β
β BAR2 Local Memory BAR2 β
β BAR3 BAR3 β
β BAR4 BAR4 β
β BAR5 BAR5 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EP CONTROLLER 1 EP CONTROLLER 2
so what this function does is set BAR1 of EP CONTROLLER 2, which contains HOST2's peer scratchpad region. β¨
now here's the tea: while BAR1 is the default peer scratchpad BAR, an NTB could have other BARs for peer scratchpad (because of 64-bit BARs or reserved BARs β yeah, it's giving chaos π). this function can get the exact BAR used for peer scratchpad from epf_ntb_bar[BAR_PEER_SPAD].
and since HOST2's peer scratchpad is also HOST1's self scratchpad, this function gets the address of peer scratchpad from peer_ntb_epc->epf_ntb_bar[BAR_CONFIG]. iykyk π§
π SEE ALSO π
kernel file: ./drivers/pci/endpoint/functions/pci-epf-ntb.c
and the whole friend group, no one 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_msix(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_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)
this page lives in./drivers/pci/endpoint/functions, dropped October 2026, and it's part of the Kernel API Manual (section 9,epf_ntb_peer_spad_bar_set(9)). kbye, go read some kernel source ππβ
π¦ 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