Add IOVA mode check in Coexistence. Update MAINTAINERS. Refresh feature list and Coexistence Usage Instructions.
Signed-off-by: Dimon Zhao <[email protected]> --- .mailmap | 2 +- MAINTAINERS | 2 +- doc/guides/nics/features/nbl.ini | 1 + doc/guides/nics/nbl.rst | 7 +++++++ drivers/net/nbl/nbl_common/nbl_userdev.c | 15 ++++++++++++--- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.mailmap b/.mailmap index e5f0cab364..0cd4b65d75 100644 --- a/.mailmap +++ b/.mailmap @@ -78,6 +78,7 @@ Allen Hubbe <[email protected]> Alok Makhariya <[email protected]> Alok Prasad <[email protected]> Alvaro Karsz <[email protected]> +Alvin Wang <[email protected]> Alvin Zhang <[email protected]> Aman Singh <[email protected]> Amaranath Somalapuram <[email protected]> @@ -869,7 +870,6 @@ Kumar Amber <[email protected]> Kumar Sanghvi <[email protected]> Kumara Parameshwaran <[email protected]> <[email protected]> Kyle Larose <[email protected]> -Kyo Liu <[email protected]> Lance Richardson <[email protected]> Laszlo Ersek <[email protected]> Laura Stroe <[email protected]> diff --git a/MAINTAINERS b/MAINTAINERS index 7fa01419cf..a0ed5b52d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1023,8 +1023,8 @@ F: doc/guides/nics/rnp.rst F: doc/guides/nics/features/rnp.ini Nebulamatrix nbl +M: Alvin Wang <[email protected]> M: Dimon Zhao <[email protected]> -M: Kyo Liu <[email protected]> M: Leon Yu <[email protected]> M: Sam Chen <[email protected]> F: drivers/net/nbl/ diff --git a/doc/guides/nics/features/nbl.ini b/doc/guides/nics/features/nbl.ini index 784ea3eecb..336a11d3aa 100644 --- a/doc/guides/nics/features/nbl.ini +++ b/doc/guides/nics/features/nbl.ini @@ -12,6 +12,7 @@ Unicast MAC filter = Y Basic stats = Y Extended stats = Y Stats per queue = Y +VLAN offload = P Linux = Y ARMv8 = Y x86-64 = Y diff --git a/doc/guides/nics/nbl.rst b/doc/guides/nics/nbl.rst index f41da20eea..0cccb11b49 100644 --- a/doc/guides/nics/nbl.rst +++ b/doc/guides/nics/nbl.rst @@ -70,6 +70,13 @@ Anolis community: Alternatively, you can contact us to obtain the `nbl_core` code and installation package. +Coexistence Between DPDK And Kernel Driver +------------------------------------------ +When this device is bound to the nbl_core driver and IOMMU is in passthrough mode, +it is necessary to force I/O virtual address (IOVA) to be mapped to physical address (PA) +with the EAL command line option ``--iova-mode=pa``. + + Prerequisites ------------- diff --git a/drivers/net/nbl/nbl_common/nbl_userdev.c b/drivers/net/nbl/nbl_common/nbl_userdev.c index bd0305affe..566f3a11ee 100644 --- a/drivers/net/nbl/nbl_common/nbl_userdev.c +++ b/drivers/net/nbl/nbl_common/nbl_userdev.c @@ -679,11 +679,20 @@ int nbl_pci_map_device(struct nbl_adapter *adapter) NBL_USERDEV_INIT_COMMON(common); iova_mode = rte_eal_iova_mode(); + + snprintf(pathname, sizeof(pathname), "/dev/nbl_userdev/" PCI_PRI_FMT, loc->domain, + loc->bus, loc->devid, loc->function); + + /* check iommu passthrough mode */ + if (!access(pathname, F_OK) && iova_mode != RTE_IOVA_PA) { + NBL_LOG(ERR, "%s IOMMU is in passthrough mode, must select IOVA as PA" + " with --iova-mode=pa", pci_dev->device.name); + ret = -1; + return ret; + } + if (iova_mode == RTE_IOVA_PA) { /* check iommu disable */ - snprintf(pathname, sizeof(pathname), - "/dev/nbl_userdev/" PCI_PRI_FMT, loc->domain, - loc->bus, loc->devid, loc->function); common->devfd = open(pathname, O_RDWR); if (common->devfd >= 0) goto mmap; -- 2.34.1

