Skip to content

Commit

Permalink
NTB: EPF: support NTB transfer between PCI RC and EP connection
Browse files Browse the repository at this point in the history
Add NTB function driver and virtual PCI BUS and Virtual NTB driver
to implement communication between PCIe RC and PCIe EP devices

┌────────────┐         ┌─────────────────────────────────────┐
│            │         │                                     │
├────────────┤         │                      ┌──────────────┤
│ NTB        │         │                      │ NTB          │
│ NetDev     │         │                      │ NetDev       │
├────────────┤         │                      ├──────────────┤
│ NTB        │         │                      │ NTB          │
│ Transfer   │         │                      │ Transfer     │
├────────────┤         │                      ├──────────────┤
│            │         │                      │              │
│  PCI NTB   │         │                      │              │
│    EPF     │         │                      │              │
│   Driver   │         │                      │ PCI Virtual  │
│            │         ├───────────────┐      │ NTB Driver   │
│            │         │ PCI EP NTB    │◄────►│              │
│            │         │  FN Driver    │      │              │
├────────────┤         ├───────────────┤      ├──────────────┤
│            │         │               │      │              │
│  PCI BUS   │ ◄─────► │  PCI EP BUS   │      │  Virtual PCI │
│            │  PCI    │               │      │     BUS      │
└────────────┘         └───────────────┴──────┴──────────────┘
    PCI RC                        PCI EP

This driver include 3 part:
 1 PCI EP NTB function driver
 2 Virtual PCI bus
 3 PCI virutal NTB driver, which is loaded only by above virtual pci bus

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Frank Li authored and Jon Mason committed Jul 18, 2022
1 parent 8a78545 commit da51fd2
Show file tree
Hide file tree
Showing 3 changed files with 1,437 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/pci/endpoint/functions/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ config PCI_EPF_NTB
device tree.

If in doubt, say "N" to disable Endpoint NTB driver.

config PCI_EPF_VNTB
tristate "PCI Endpoint NTB driver"
depends on PCI_ENDPOINT
select CONFIGFS_FS
help
Select this configuration option to enable the Non-Transparent
Bridge (NTB) driver for PCI Endpoint. NTB driver implements NTB
between PCI host and PCIe Endpoint.

If in doubt, say "N" to disable Endpoint NTB driver.
1 change: 1 addition & 0 deletions drivers/pci/endpoint/functions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

obj-$(CONFIG_PCI_EPF_TEST) += pci-epf-test.o
obj-$(CONFIG_PCI_EPF_NTB) += pci-epf-ntb.o
obj-$(CONFIG_PCI_EPF_VNTB) += pci-epf-vntb.o
Loading

0 comments on commit da51fd2

Please sign in to comment.