From: Dimon Zhao <dimon.zhao@nebula-matrix.com>
To: dev@dpdk.org
Cc: Dimon Zhao <dimon.zhao@nebula-matrix.com>,
Thomas Monjalon <thomas@monjalon.net>,
Alvin Wang <alvin.wang@nebula-matrix.com>,
Leon Yu <leon.yu@nebula-matrix.com>,
Sam Chen <sam.chen@nebula-matrix.com>
Subject: [PATCH v2 4/4] net/nbl: add IOVA mode check in Coexistence
Date: Tue, 11 Nov 2025 03:31:43 -0800 [thread overview]
Message-ID: <20251111113144.3567291-5-dimon.zhao@nebula-matrix.com> (raw)
In-Reply-To: <20251111113144.3567291-1-dimon.zhao@nebula-matrix.com>
Add IOVA mode check in Coexistence.
Update MAINTAINERS.
Refresh feature list and Coexistence Usage Instructions.
Signed-off-by: Dimon Zhao <dimon.zhao@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@amd.com>
Alok Makhariya <alok.makhariya@nxp.com>
Alok Prasad <palok@marvell.com>
Alvaro Karsz <alvaro.karsz@solid-run.com>
+Alvin Wang <alvin.wang@nebula-matrix.com>
Alvin Zhang <alvinx.zhang@intel.com>
Aman Singh <aman.deep.singh@intel.com>
Amaranath Somalapuram <asomalap@amd.com>
@@ -869,7 +870,6 @@ Kumar Amber <kumar.amber@intel.com>
Kumar Sanghvi <kumaras@chelsio.com>
Kumara Parameshwaran <kumaraparamesh92@gmail.com> <kparameshwar@vmware.com>
Kyle Larose <klarose@sandvine.com>
-Kyo Liu <kyo.liu@nebula-matrix.com>
Lance Richardson <lance.richardson@broadcom.com>
Laszlo Ersek <lersek@redhat.com>
Laura Stroe <laura.stroe@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@nebula-matrix.com>
M: Dimon Zhao <dimon.zhao@nebula-matrix.com>
-M: Kyo Liu <kyo.liu@nebula-matrix.com>
M: Leon Yu <leon.yu@nebula-matrix.com>
M: Sam Chen <sam.chen@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
next prev parent reply other threads:[~2025-11-11 11:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 7:34 [PATCH v1 0/4] NBL add new features Dimon Zhao
2025-11-07 7:34 ` [PATCH v1 1/4] net/nbl: change default Rx extension header size to 12 bytes Dimon Zhao
2025-11-11 14:32 ` Stephen Hemminger
2025-11-07 7:34 ` [PATCH v1 2/4] net/nbl: add support for Tx and Rx VLAN offload Dimon Zhao
2025-11-07 16:10 ` Stephen Hemminger
2025-11-10 8:17 ` 回复:[PATCH " Dimon
2025-11-07 7:34 ` [PATCH v1 3/4] net/nbl: add support for imissed stats Dimon Zhao
2025-11-07 16:05 ` Stephen Hemminger
2025-11-07 7:34 ` [PATCH v1 4/4] net/nbl: update documentation and maintainers Dimon Zhao
2025-11-09 20:16 ` Stephen Hemminger
2025-11-10 8:56 ` 回复:[PATCH " Dimon
2025-11-11 11:31 ` [PATCH v2 0/4] NBL add new features Dimon Zhao
2025-11-11 11:31 ` [PATCH v2 1/4] net/nbl: change default Rx extension header size to 12 bytes Dimon Zhao
2025-11-11 11:31 ` [PATCH v2 2/4] net/nbl: add support for Tx and Rx VLAN offload Dimon Zhao
2025-11-11 11:31 ` [PATCH v2 3/4] net/nbl: add support for imissed stats Dimon Zhao
2025-11-11 11:31 ` Dimon Zhao [this message]
2025-11-11 21:19 ` [PATCH v2 4/4] net/nbl: add IOVA mode check in Coexistence Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251111113144.3567291-5-dimon.zhao@nebula-matrix.com \
--to=dimon.zhao@nebula-matrix.com \
--cc=alvin.wang@nebula-matrix.com \
--cc=dev@dpdk.org \
--cc=leon.yu@nebula-matrix.com \
--cc=sam.chen@nebula-matrix.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).