Gsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/driver-api/ntbmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/driver-api/ntbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/driver-api/ntbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/driver-api/ntbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/driver-api/ntbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/driver-api/ntbmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h NTB Driversh]h NTB Drivers}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hj hhubh)}(h}The second type of interface, that implies the shared windows being initialized by a peer device, is depicted on the figure::h]h|The second type of interface, that implies the shared windows being initialized by a peer device, is depicted on the figure:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hj hhubj-)}(hXOutbound translation: Memory: Local NTB Port: Peer NTB Port: Peer MMIO: ____________ ______________ | dma-mapped | | | MW base addr |<== memory-mapped IO | memory | | |--------------| | (addr) |<===================| MW xlat addr |<-ntb_peer_mw_set_trans(addr) |------------| | |--------------|h]hXOutbound translation: Memory: Local NTB Port: Peer NTB Port: Peer MMIO: ____________ ______________ | dma-mapped | | | MW base addr |<== memory-mapped IO | memory | | |--------------| | (addr) |<===================| MW xlat addr |<-ntb_peer_mw_set_trans(addr) |------------| | |--------------|}hjZsbah}(h]h ]h"]h$]h&]j<j=uh1j,hhhK@hj hhubh)}(hX*Typical scenario of the second type interface initialization would be: 1) allocate a memory region, 2) somehow deliver a translated address to a peer device, 3) peer puts the translated address to NTB config, 4) peer device maps outbound memory window so to have access to the shared memory region.h]hX*Typical scenario of the second type interface initialization would be: 1) allocate a memory region, 2) somehow deliver a translated address to a peer device, 3) peer puts the translated address to NTB config, 4) peer device maps outbound memory window so to have access to the shared memory region.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhj hhubh)}(hQAs one can see the described scenarios can be combined in one portable algorithm.h]hQAs one can see the described scenarios can be combined in one portable algorithm.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhj hhubh block_quote)}(hXLocal device: 1) Allocate memory for a shared window 2) Initialize memory window by translated address of the allocated region (it may fail if local memory window initialization is unsupported) 3) Send the translated address and memory window index to a peer device Peer device: 1) Initialize memory window with retrieved address of the allocated by another device memory region (it may fail if peer memory window initialization is unsupported) 2) Map outbound memory window h]hdefinition_list)}(hhh](hdefinition_list_item)}(hX Local device: 1) Allocate memory for a shared window 2) Initialize memory window by translated address of the allocated region (it may fail if local memory window initialization is unsupported) 3) Send the translated address and memory window index to a peer device h](hterm)}(h Local device:h]h Local device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKUhjubh definition)}(hhh]henumerated_list)}(hhh](h list_item)}(h#Allocate memory for a shared windowh]h)}(hjh]h#Allocate memory for a shared window}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hInitialize memory window by translated address of the allocated region (it may fail if local memory window initialization is unsupported)h]h)}(hInitialize memory window by translated address of the allocated region (it may fail if local memory window initialization is unsupported)h]hInitialize memory window by translated address of the allocated region (it may fail if local memory window initialization is unsupported)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hESend the translated address and memory window index to a peer device h]h)}(hDSend the translated address and memory window index to a peer deviceh]hDSend the translated address and memory window index to a peer device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKUhjubj)}(hPeer device: 1) Initialize memory window with retrieved address of the allocated by another device memory region (it may fail if peer memory window initialization is unsupported) 2) Map outbound memory window h](j)}(h Peer device:h]h Peer device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK[hjubj)}(hhh]j)}(hhh](j)}(hInitialize memory window with retrieved address of the allocated by another device memory region (it may fail if peer memory window initialization is unsupported)h]h)}(hInitialize memory window with retrieved address of the allocated by another device memory region (it may fail if peer memory window initialization is unsupported)h]hInitialize memory window with retrieved address of the allocated by another device memory region (it may fail if peer memory window initialization is unsupported)}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhj'ubah}(h]h ]h"]h$]h&]uh1jhj$ubj)}(hMap outbound memory window h]h)}(hMap outbound memory windowh]hMap outbound memory window}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj?ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK[hjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKQhj hhubh)}(hSIn accordance with this scenario, the NTB Memory Window API can be used as follows:h]hSIn accordance with this scenario, the NTB Memory Window API can be used as follows:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj hhubj)}(hXLocal device: 1) ntb_mw_count(pidx) - retrieve number of memory ranges, which can be allocated for memory windows between local device and peer device of port with specified index. 2) ntb_get_align(pidx, midx) - retrieve parameters restricting the shared memory region alignment and size. Then memory can be properly allocated. 3) Allocate physically contiguous memory region in compliance with restrictions retrieved in 2). 4) ntb_mw_set_trans(pidx, midx) - try to set translation address of the memory window with specified index for the defined peer device (it may fail if local translated address setting is not supported) 5) Send translated base address (usually together with memory window number) to the peer device using, for instance, scratchpad or message registers. Peer device: 1) ntb_peer_mw_set_trans(pidx, midx) - try to set received from other device (related to pidx) translated address for specified memory window. It may fail if retrieved address, for instance, exceeds maximum possible address or isn't properly aligned. 2) ntb_peer_mw_get_addr(widx) - retrieve MMIO address to map the memory window so to have an access to the shared memory. h]j)}(hhh](j)}(hX$Local device: 1) ntb_mw_count(pidx) - retrieve number of memory ranges, which can be allocated for memory windows between local device and peer device of port with specified index. 2) ntb_get_align(pidx, midx) - retrieve parameters restricting the shared memory region alignment and size. Then memory can be properly allocated. 3) Allocate physically contiguous memory region in compliance with restrictions retrieved in 2). 4) ntb_mw_set_trans(pidx, midx) - try to set translation address of the memory window with specified index for the defined peer device (it may fail if local translated address setting is not supported) 5) Send translated base address (usually together with memory window number) to the peer device using, for instance, scratchpad or message registers. h](j)}(h Local device:h]h Local device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKnhjubj)}(hhh]j)}(hhh](j)}(hntb_mw_count(pidx) - retrieve number of memory ranges, which can be allocated for memory windows between local device and peer device of port with specified index.h]h)}(hntb_mw_count(pidx) - retrieve number of memory ranges, which can be allocated for memory windows between local device and peer device of port with specified index.h]hntb_mw_count(pidx) - retrieve number of memory ranges, which can be allocated for memory windows between local device and peer device of port with specified index.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hntb_get_align(pidx, midx) - retrieve parameters restricting the shared memory region alignment and size. Then memory can be properly allocated.h]h)}(hntb_get_align(pidx, midx) - retrieve parameters restricting the shared memory region alignment and size. Then memory can be properly allocated.h]hntb_get_align(pidx, midx) - retrieve parameters restricting the shared memory region alignment and size. Then memory can be properly allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h]Allocate physically contiguous memory region in compliance with restrictions retrieved in 2).h]h)}(h]Allocate physically contiguous memory region in compliance with restrictions retrieved in 2).h]h]Allocate physically contiguous memory region in compliance with restrictions retrieved in 2).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hntb_mw_set_trans(pidx, midx) - try to set translation address of the memory window with specified index for the defined peer device (it may fail if local translated address setting is not supported)h]h)}(hntb_mw_set_trans(pidx, midx) - try to set translation address of the memory window with specified index for the defined peer device (it may fail if local translated address setting is not supported)h]hntb_mw_set_trans(pidx, midx) - try to set translation address of the memory window with specified index for the defined peer device (it may fail if local translated address setting is not supported)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hSend translated base address (usually together with memory window number) to the peer device using, for instance, scratchpad or message registers. h]h)}(hSend translated base address (usually together with memory window number) to the peer device using, for instance, scratchpad or message registers.h]hSend translated base address (usually together with memory window number) to the peer device using, for instance, scratchpad or message registers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKnhjubj)}(hXPeer device: 1) ntb_peer_mw_set_trans(pidx, midx) - try to set received from other device (related to pidx) translated address for specified memory window. It may fail if retrieved address, for instance, exceeds maximum possible address or isn't properly aligned. 2) ntb_peer_mw_get_addr(widx) - retrieve MMIO address to map the memory window so to have an access to the shared memory. h](j)}(h Peer device:h]h Peer device:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKvhj,ubj)}(hhh]j)}(hhh](j)}(hntb_peer_mw_set_trans(pidx, midx) - try to set received from other device (related to pidx) translated address for specified memory window. It may fail if retrieved address, for instance, exceeds maximum possible address or isn't properly aligned.h]h)}(hntb_peer_mw_set_trans(pidx, midx) - try to set received from other device (related to pidx) translated address for specified memory window. It may fail if retrieved address, for instance, exceeds maximum possible address or isn't properly aligned.h]hntb_peer_mw_set_trans(pidx, midx) - try to set received from other device (related to pidx) translated address for specified memory window. It may fail if retrieved address, for instance, exceeds maximum possible address or isn’t properly aligned.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjDubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hwntb_peer_mw_get_addr(widx) - retrieve MMIO address to map the memory window so to have an access to the shared memory. h]h)}(hvntb_peer_mw_get_addr(widx) - retrieve MMIO address to map the memory window so to have an access to the shared memory.h]hvntb_peer_mw_get_addr(widx) - retrieve MMIO address to map the memory window so to have an access to the shared memory.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj\ubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj>ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhhhKvhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK`hj hhubh)}(hAlso it is worth to note, that method ntb_mw_count(pidx) should return the same value as ntb_peer_mw_count() on the peer with port index - pidx.h]hAlso it is worth to note, that method ntb_mw_count(pidx) should return the same value as ntb_peer_mw_count() on the peer with port index - pidx.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj hhubeh}(h](ntb-typical-client-driver-implementationah ]h"](ntb typical client driver implementationah$]h&]uh1hhhhhhhhK$ubh)}(hhh](h)}(hBNTB Transport Client (ntb\_transport) and NTB Netdev (ntb\_netdev)h]hBNTB Transport Client (ntb_transport) and NTB Netdev (ntb_netdev)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK|ubh)}(hX^The primary client for NTB is the Transport client, used in tandem with NTB Netdev. These drivers function together to create a logical link to the peer, across the ntb, to exchange packets of network data. The Transport client establishes a logical link to the peer, and creates queue pairs to exchange messages and data. The NTB Netdev then creates an ethernet device using a Transport queue pair. Network data is copied between socket buffers and the Transport queue pair buffer. The Transport client may be used for other things besides Netdev, however no other applications have yet been written.h]hX^The primary client for NTB is the Transport client, used in tandem with NTB Netdev. These drivers function together to create a logical link to the peer, across the ntb, to exchange packets of network data. The Transport client establishes a logical link to the peer, and creates queue pairs to exchange messages and data. The NTB Netdev then creates an ethernet device using a Transport queue pair. Network data is copied between socket buffers and the Transport queue pair buffer. The Transport client may be used for other things besides Netdev, however no other applications have yet been written.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjhhubeh}(h] db`). To clear the doorbell, write `c` followed by the bits to clear.h]j)}(hhh]j)}(hX<*hw*/db This file is used to read, set, and clear the local doorbell. Not all operations may be supported by all hardware. To read the doorbell, read the file. To set the doorbell, write `s` followed by the bits to set (eg: `echo 's 0x0101' > db`). To clear the doorbell, write `c` followed by the bits to clear.h](j)}(h*hw*/dbh](jg)}(h*hw*h]hhw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh/db}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hX4This file is used to read, set, and clear the local doorbell. Not all operations may be supported by all hardware. To read the doorbell, read the file. To set the doorbell, write `s` followed by the bits to set (eg: `echo 's 0x0101' > db`). To clear the doorbell, write `c` followed by the bits to clear.h](hThis file is used to read, set, and clear the local doorbell. Not all operations may be supported by all hardware. To read the doorbell, read the file. To set the doorbell, write }(hjhhhNhNubhtitle_reference)}(h`s`h]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" followed by the bits to set (eg: }(hjhhhNhNubj)}(h`echo 's 0x0101' > db`h]hecho ‘s 0x0101’ > db}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh!). To clear the doorbell, write }(hjhhhNhNubj)}(h`c`h]hc}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh followed by the bits to clear.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubj)}(hn*hw*/mask This file is used to read, set, and clear the local doorbell mask. See *db* for details.h]j)}(hhh]j)}(hb*hw*/mask This file is used to read, set, and clear the local doorbell mask. See *db* for details.h](j)}(h *hw*/maskh](jg)}(h*hw*h]hhw}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj`ubh/mask}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj\ubj)}(hhh]h)}(hXThis file is used to read, set, and clear the local doorbell mask. See *db* for details.h](hGThis file is used to read, set, and clear the local doorbell mask. See }(hjhhhNhNubjg)}(h*db*h]hdb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj|ubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjYubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubj)}(hl*hw*/peer\_db This file is used to read, set, and clear the peer doorbell. See *db* for details.h]j)}(hhh]j)}(h`*hw*/peer\_db This file is used to read, set, and clear the peer doorbell. See *db* for details.h](j)}(h *hw*/peer\_dbh](jg)}(h*hw*h]hhw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh /peer_db}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hRThis file is used to read, set, and clear the peer doorbell. See *db* for details.h](hAThis file is used to read, set, and clear the peer doorbell. See }(hjhhhNhNubjg)}(h*db*h]hdb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubj)}(ht*hw*/peer\_mask This file is used to read, set, and clear the peer doorbell mask. See *db* for details.h]j)}(hhh]j)}(hh*hw*/peer\_mask This file is used to read, set, and clear the peer doorbell mask. See *db* for details.h](j)}(h*hw*/peer\_maskh](jg)}(h*hw*h]hhw}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj$ubh /peer_mask}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hXThis file is used to read, set, and clear the peer doorbell mask. See *db* for details.h](hGThis file is used to read, set, and clear the peer doorbell mask. See }(hjChhhNhNubjg)}(h*db*h]hdb}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjCubh for details.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj@ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubj)}(hXK*hw*/spad This file is used to read and write local scratchpads. To read the values of all scratchpads, read the file. To write values, write a series of pairs of scratchpad number and value (eg: `echo '4 0x123 7 0xabc' > spad` # to set scratchpads `4` and `7` to `0x123` and `0xabc`, respectively).h]j)}(hhh]j)}(hX-*hw*/spad This file is used to read and write local scratchpads. To read the values of all scratchpads, read the file. To write values, write a series of pairs of scratchpad number and value (eg: `echo '4 0x123 7 0xabc' > spad` # to set scratchpads `4` and `7` to `0x123` and `0xabc`, respectively).h](j)}(h *hw*/spadh](jg)}(h*hw*h]hhw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh/spad}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hX#This file is used to read and write local scratchpads. To read the values of all scratchpads, read the file. To write values, write a series of pairs of scratchpad number and value (eg: `echo '4 0x123 7 0xabc' > spad` # to set scratchpads `4` and `7` to `0x123` and `0xabc`, respectively).h](hThis file is used to read and write local scratchpads. To read the values of all scratchpads, read the file. To write values, write a series of pairs of scratchpad number and value (eg: }(hjhhhNhNubj)}(h`echo '4 0x123 7 0xabc' > spad`h]h!echo ‘4 0x123 7 0xabc’ > spad}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh # to set scratchpads }(hjhhhNhNubj)}(h`4`h]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h`7`h]h7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h`0x123`h]h0x123}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h`0xabc`h]h0xabc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, respectively).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubj)}(hk*hw*/peer\_spad This file is used to read and write peer scratchpads. See *spad* for details. h]j)}(hhh]j)}(h_*hw*/peer\_spad This file is used to read and write peer scratchpads. See *spad* for details. h](j)}(h*hw*/peer\_spadh](jg)}(h*hw*h]hhw}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj0ubh /peer_spad}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj,ubj)}(hhh]h)}(hNThis file is used to read and write peer scratchpads. See *spad* for details.h](h;This file is used to read and write peer scratchpads. See }(hjOhhhNhNubjg)}(h*spad*h]hspad}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjOubh for details.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjLubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj)ubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jhjThhhNhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubeh}(h]ntb-tool-test-client-ntb-toolah ]h"]ntb tool test client (ntb_tool)ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h$NTB MSI Test Client (ntb\_msi\_test)h]h$NTB MSI Test Client (ntb_msi_test)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe MSI test client serves to test and debug the MSI library which allows for passing MSI interrupts across NTB memory windows. The test client is interacted with through the debugfs filesystem:h]hThe MSI test client serves to test and debug the MSI library which allows for passing MSI interrupts across NTB memory windows. The test client is interacted with through the debugfs filesystem:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(h*debugfs*/ntb\_msi\_test/*hw*/ A directory in debugfs will be created for each NTB device probed by the msi test. This directory is shortened to *hw* below.h]j)}(hhh]j)}(h*debugfs*/ntb\_msi\_test/*hw*/ A directory in debugfs will be created for each NTB device probed by the msi test. This directory is shortened to *hw* below.h](j)}(h*debugfs*/ntb\_msi\_test/*hw*/h](jg)}(h *debugfs*h]hdebugfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh/ntb_msi_test/}(hjhhhNhNubjg)}(h*hw*h]hhw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh/}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h~A directory in debugfs will be created for each NTB device probed by the msi test. This directory is shortened to *hw* below.h](hsA directory in debugfs will be created for each NTB device probed by the msi test. This directory is shortened to }(hjhhhNhNubjg)}(h*hw*h]hhw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjubh below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(h9*hw*/port This file describes the local port numberh]j)}(hhh]j)}(h3*hw*/port This file describes the local port numberh](j)}(h *hw*/porth](jg)}(h*hw*h]hhw}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj6 ubh/port}(hj6 hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj2 ubj)}(hhh]h)}(h)This file describes the local port numberh]h)This file describes the local port number}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjR ubah}(h]h ]h"]h$]h&]uh1jhj2 ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj/ ubah}(h]h ]h"]h$]h&]uh1jhj+ ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(h*hw*/irq*_occurrences One occurrences file exists for each interrupt and, when read, returns the number of times the interrupt has been triggered.h]j)}(hhh]j)}(h*hw*/irq*_occurrences One occurrences file exists for each interrupt and, when read, returns the number of times the interrupt has been triggered.h](j)}(h*hw*/irq*_occurrencesh](jg)}(h*hw*h]hhw}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh/irq*_occurrences}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(h|One occurrences file exists for each interrupt and, when read, returns the number of times the interrupt has been triggered.h]h|One occurrences file exists for each interrupt and, when read, returns the number of times the interrupt has been triggered.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hG*hw*/peer*/port This file describes the port number for each peerh]j)}(hhh]j)}(hA*hw*/peer*/port This file describes the port number for each peerh](j)}(h*hw*/peer*/porth](jg)}(h*hw*h]hhw}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh /peer*/port}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(h1This file describes the port number for each peerh]h1This file describes the port number for each peer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hl*hw*/peer*/count This file describes the number of interrupts that can be triggered on each peerh]j)}(hhh]j)}(h`*hw*/peer*/count This file describes the number of interrupts that can be triggered on each peerh](j)}(h*hw*/peer*/counth](jg)}(h*hw*h]hhw}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj& ubh /peer*/count}(hj& hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj" ubj)}(hhh]h)}(hOThis file describes the number of interrupts that can be triggered on each peerh]hOThis file describes the number of interrupts that can be triggered on each peer}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjB ubah}(h]h ]h"]h$]h&]uh1jhj" ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(h*hw*/peer*/trigger Writing an interrupt number (any number less than the value specified in count) will trigger the interrupt on the specified peer. That peer's interrupt's occurrence file should be incremented. h]j)}(hhh]j)}(h*hw*/peer*/trigger Writing an interrupt number (any number less than the value specified in count) will trigger the interrupt on the specified peer. That peer's interrupt's occurrence file should be incremented. h](j)}(h*hw*/peer*/triggerh](jg)}(h*hw*h]hhw}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjv ubh/peer*/trigger}(hjv hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjr ubj)}(hhh]h)}(hWriting an interrupt number (any number less than the value specified in count) will trigger the interrupt on the specified peer. That peer's interrupt's occurrence file should be incremented.h]hWriting an interrupt number (any number less than the value specified in count) will trigger the interrupt on the specified peer. That peer’s interrupt’s occurrence file should be incremented.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjr ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjo ubah}(h]h ]h"]h$]h&]uh1jhjk ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubeh}(h] ntb-msi-test-client-ntb-msi-testah ]h"]"ntb msi test client (ntb_msi_test)ah$]h&]uh1hhhhhhhhKubeh}(h]ntb-client-driversah ]h"]ntb client driversah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNTB Hardware Driversh]hNTB Hardware Drivers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hNTB hardware drivers should register devices with the NTB core driver. After registering, clients probe and remove functions will be called.h]hNTB hardware drivers should register devices with the NTB core driver. After registering, clients probe and remove functions will be called.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](h)}(h*NTB Intel Hardware Driver (ntb\_hw\_intel)h]h*NTB Intel Hardware Driver (ntb_hw_intel)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(h=The Intel hardware driver supports NTB on Xeon and Atom CPUs.h]h=The Intel hardware driver supports NTB on Xeon and Atom CPUs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hModule Parameters:h]hModule Parameters:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh](j)}(hXHb2b\_mw\_idx If the peer ntb is to be accessed via a memory window, then use this memory window to access the peer ntb. A value of zero or positive starts from the first mw idx, and a negative value starts from the last mw idx. Both sides MUST set the same value here! The default value is `-1`.h]j)}(hhh]j)}(hX*b2b\_mw\_idx If the peer ntb is to be accessed via a memory window, then use this memory window to access the peer ntb. A value of zero or positive starts from the first mw idx, and a negative value starts from the last mw idx. Both sides MUST set the same value here! The default value is `-1`.h](j)}(h b2b\_mw\_idxh]h b2b_mw_idx}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj' ubj)}(hhh]h)}(hXIf the peer ntb is to be accessed via a memory window, then use this memory window to access the peer ntb. A value of zero or positive starts from the first mw idx, and a negative value starts from the last mw idx. Both sides MUST set the same value here! The default value is `-1`.h](hXIf the peer ntb is to be accessed via a memory window, then use this memory window to access the peer ntb. A value of zero or positive starts from the first mw idx, and a negative value starts from the last mw idx. Both sides MUST set the same value here! The default value is }(hj< hhhNhNubj)}(h`-1`h]h-1}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubh.}(hj< hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9 ubah}(h]h ]h"]h$]h&]uh1jhj' ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj$ ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhNhNubj)}(hb2b\_mw\_share If the peer ntb is to be accessed via a memory window, and if the memory window is large enough, still allow the client to use the second half of the memory window for address translation to the peer.h]j)}(hhh]j)}(hb2b\_mw\_share If the peer ntb is to be accessed via a memory window, and if the memory window is large enough, still allow the client to use the second half of the memory window for address translation to the peer.h](j)}(hb2b\_mw\_shareh]hb2b_mw_share}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj{ ubj)}(hhh]h)}(hIf the peer ntb is to be accessed via a memory window, and if the memory window is large enough, still allow the client to use the second half of the memory window for address translation to the peer.h]hIf the peer ntb is to be accessed via a memory window, and if the memory window is large enough, still allow the client to use the second half of the memory window for address translation to the peer.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjx ubah}(h]h ]h"]h$]h&]uh1jhjt ubah}(h]h ]h"]h$]h&]uh1jhj hhhNhNubj)}(hxeon\_b2b\_usd\_bar2\_addr64 If using B2B topology on Xeon hardware, use this 64 bit address on the bus between the NTB devices for the window at BAR2, on the upstream side of the link.h]j)}(hhh]j)}(hxeon\_b2b\_usd\_bar2\_addr64 If using B2B topology on Xeon hardware, use this 64 bit address on the bus between the NTB devices for the window at BAR2, on the upstream side of the link.h](j)}(hxeon\_b2b\_usd\_bar2\_addr64h]hxeon_b2b_usd_bar2_addr64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hIf using B2B topology on Xeon hardware, use this 64 bit address on the bus between the NTB devices for the window at BAR2, on the upstream side of the link.h]hIf using B2B topology on Xeon hardware, use this 64 bit address on the bus between the NTB devices for the window at BAR2, on the upstream side of the link.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhNhNubj)}(h=xeon\_b2b\_usd\_bar4\_addr64 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hj h](h#xeon_b2b_usd_bar4_addr64 - See }(hj hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_usd\_bar4\_addr32 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hj# h](h#xeon_b2b_usd_bar4_addr32 - See }(hj% hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj% ubh.}(hj% hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj! ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_usd\_bar5\_addr32 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hjL h](h#xeon_b2b_usd_bar5_addr32 - See }(hjN hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjN ubh.}(hjN hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjJ ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_dsd\_bar2\_addr64 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hju h](h#xeon_b2b_dsd_bar2_addr64 - See }(hjw hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjw ubh.}(hjw hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_dsd\_bar4\_addr64 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hj h](h#xeon_b2b_dsd_bar4_addr64 - See }(hj hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_dsd\_bar4\_addr32 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hj h](h#xeon_b2b_dsd_bar4_addr32 - See }(hj hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h=xeon\_b2b\_dsd\_bar5\_addr32 - See *xeon\_b2b\_bar2\_addr64*.h]h)}(hj h](h#xeon_b2b_dsd_bar5_addr32 - See }(hj hhhNhNubjg)}(h*xeon\_b2b\_bar2\_addr64*h]hxeon_b2b_bar2_addr64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jfhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhj hhubeh}(h]&ntb-intel-hardware-driver-ntb-hw-intelah ]h"](ntb intel hardware driver (ntb_hw_intel)ah$]h&]uh1hhj hhhhhKubeh}(h]ntb-hardware-driversah ]h"]ntb hardware driversah$]h&]uh1hhhhhhhhKubeh}(h] ntb-driversah ]h"] ntb driversah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjX error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j2 j/ hhj j jjjjjjjjj j j* j' j" j u nametypes}(j2 hj jjjjj j* j" uh}(j/ hhhj hjj jjjjjjj jj' j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.