[PATCH v2 4/4] net/nbl: add IOVA mode check in Coexistence

Dimon Zhao dimon.zhao at nebula-matrix.com
Tue Nov 11 12:31:43 CET 2025


Add IOVA mode check in Coexistence.
Update MAINTAINERS.
Refresh feature list and Coexistence Usage Instructions.

Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
---
 .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 <allen.hubbe at amd.com>
 Alok Makhariya <alok.makhariya at nxp.com>
 Alok Prasad <palok at marvell.com>
 Alvaro Karsz <alvaro.karsz at solid-run.com>
+Alvin Wang <alvin.wang at nebula-matrix.com>
 Alvin Zhang <alvinx.zhang at intel.com>
 Aman Singh <aman.deep.singh at intel.com>
 Amaranath Somalapuram <asomalap at amd.com>
@@ -869,7 +870,6 @@ Kumar Amber <kumar.amber at intel.com>
 Kumar Sanghvi <kumaras at chelsio.com>
 Kumara Parameshwaran <kumaraparamesh92 at gmail.com> <kparameshwar at vmware.com>
 Kyle Larose <klarose at sandvine.com>
-Kyo Liu <kyo.liu at nebula-matrix.com>
 Lance Richardson <lance.richardson at broadcom.com>
 Laszlo Ersek <lersek at redhat.com>
 Laura Stroe <laura.stroe at intel.com>
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 <alvin.wang at nebula-matrix.com>
 M: Dimon Zhao <dimon.zhao at nebula-matrix.com>
-M: Kyo Liu <kyo.liu at nebula-matrix.com>
 M: Leon Yu <leon.yu at nebula-matrix.com>
 M: Sam Chen <sam.chen at nebula-matrix.com>
 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



More information about the dev mailing list