]> asedeno.scripts.mit.edu Git - linux.git/commit
NTB: Add indexed ports NTB API
authorSerge Semin <fancer.lancer@gmail.com>
Tue, 13 Dec 2016 23:49:14 +0000 (02:49 +0300)
committerJon Mason <jdmason@kudzu.us>
Thu, 6 Jul 2017 15:30:07 +0000 (11:30 -0400)
commit1e5301196a88961b02fe43c73a952f78b2c84712
treee7ea5ccf325709d0af0faf6d4f177d44a89f3371
parent60934b200ddd62187b149a7f32cc0f160c08a7ed
NTB: Add indexed ports NTB API

There is some NTB hardware, which can combine more than just two domains
over NTB. For instance, some IDT PCIe-switches can have NTB-functions
activated on more than two-ports. The different domains are distinguished
by ports they are connected to. So the new port-related methods are added to
the NTB API:
 ntb_port_number() - return local port
 ntb_peer_port_count() - return number of peers local port can connect to
 ntb_peer_port_number(pdix) - return port number by it index
 ntb_peer_port_idx(port) - return port index by it number

Current test-drivers aren't changed much. They still support two-ports devices
for the time being while multi-ports hardware drivers aren't added.

By default port-related API is declared for two-ports hardware.
So corresponding hardware drivers won't need to implement it.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb.c
drivers/ntb/ntb_transport.c
drivers/ntb/test/ntb_perf.c
drivers/ntb/test/ntb_pingpong.c
drivers/ntb/test/ntb_tool.c
include/linux/ntb.h