add minimum PMD code, doc and build infrastructure for nbl driver.

Signed-off-by: Dimon Zhao <[email protected]>
---
 .mailmap                                      |  4 +
 MAINTAINERS                                   |  9 ++
 doc/guides/nics/features/nbl.ini              | 18 ++++
 doc/guides/nics/index.rst                     |  1 +
 doc/guides/nics/nbl.rst                       | 87 +++++++++++++++++++
 doc/guides/rel_notes/release_25_11.rst        |  4 +
 drivers/net/meson.build                       |  1 +
 drivers/net/nbl/meson.build                   | 11 +++
 drivers/net/nbl/nbl_ethdev.c                  |  3 +
 .../net/nbl/nbl_include/nbl_product_base.h    | 31 +++++++
 10 files changed, 169 insertions(+)
 create mode 100644 doc/guides/nics/features/nbl.ini
 create mode 100644 doc/guides/nics/nbl.rst
 create mode 100644 drivers/net/nbl/meson.build
 create mode 100644 drivers/net/nbl/nbl_ethdev.c
 create mode 100644 drivers/net/nbl/nbl_include/nbl_product_base.h

diff --git a/.mailmap b/.mailmap
index 984621f26b..ce494f22ee 100644
--- a/.mailmap
+++ b/.mailmap
@@ -378,6 +378,7 @@ Diana Wang <[email protected]>
 Didier Pallard <[email protected]>
 Dilshod Urazov <[email protected]>
 Dima Ruinskiy <[email protected]>
+Dimon Zhao <[email protected]>
 Ding Zhi <[email protected]>
 Diogo Behrens <[email protected]>
 Dirk-Holger Lenz <[email protected]>
@@ -864,6 +865,7 @@ Kumar Amber <[email protected]>
 Kumara Parameshwaran <[email protected]> <[email protected]>
 Kumar Sanghvi <[email protected]>
 Kyle Larose <[email protected]>
+Kyo Liu <[email protected]>
 Lance Richardson <[email protected]>
 Laszlo Ersek <[email protected]>
 Laura Stroe <[email protected]>
@@ -878,6 +880,7 @@ Lei Gong <[email protected]>
 Lei Ji <[email protected]>
 Lei Yao <[email protected]>
 Leonid Myravjev <[email protected]>
+Leon Yu <[email protected]>
 Leo Xu <[email protected]>
 Leszek Zygo <[email protected]>
 Levend Sayar <[email protected]>
@@ -1397,6 +1400,7 @@ Saikrishna Edupuganti <[email protected]>
 Saleh Alsouqi <[email protected]> <[email protected]>
 Salem Sol <[email protected]>
 Sam Andrew <[email protected]>
+Sam Chen <[email protected]>
 Sameh Gobriel <[email protected]>
 Sam Grove <[email protected]>
 Samik Gupta <[email protected]>
diff --git a/MAINTAINERS b/MAINTAINERS
index ad02128ca1..1f08899870 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1018,6 +1018,15 @@ F: drivers/net/rnp/
 F: doc/guides/nics/rnp.rst
 F: doc/guides/nics/features/rnp.ini
 
+Nebulamatrix nbl
+M: Dimon Zhao <[email protected]>
+M: Kyo Liu<[email protected]>
+M: Leon Yu <[email protected]>
+M: Sam Chen <[email protected]>
+F: drivers/net/nbl
+F: doc/guides/nics/nbl.rst
+F: doc/guides/nics/features/nbl.ini
+
 Realtek r8169
 M: Howard Wang <[email protected]>
 M: Chunhao Lin <[email protected]>
diff --git a/doc/guides/nics/features/nbl.ini b/doc/guides/nics/features/nbl.ini
new file mode 100644
index 0000000000..b579743dc7
--- /dev/null
+++ b/doc/guides/nics/features/nbl.ini
@@ -0,0 +1,18 @@
+;
+; Supported features of the 'nbl' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Speed capabilities   = Y
+MTU update           = Y
+Scattered Rx         = Y
+Promiscuous mode     = Y
+Unicast MAC filter   = Y
+VLAN filter          = Y
+Basic stats          = Y
+Extended stats       = Y
+Stats per queue      = Y
+Linux                = Y
+ARMv8                = Y
+x86-64               = Y
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index 1a1e3a6825..14276a366c 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -51,6 +51,7 @@ Network Interface Controller Drivers
     mvneta
     mvpp2
     netvsc
+    nbl
     nfb
     nfp
     ngbe
diff --git a/doc/guides/nics/nbl.rst b/doc/guides/nics/nbl.rst
new file mode 100644
index 0000000000..fa5dfaecdc
--- /dev/null
+++ b/doc/guides/nics/nbl.rst
@@ -0,0 +1,87 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+   Copyright 2025 Nebulamatrix Technology Co., Ltd
+
+NBL Poll Mode Driver
+====================
+
+The NBL PMD (**librte_net_nbl**) provides poll mode driver support for
+10/25/50/100/200 Gbps Nebulamatrix Series Network Adapters.
+
+
+Features
+--------
+
+Features of the NBL PMD are:
+
+- Multiple queues for TX and RX
+- Receiver Side Scaling (RSS). Currently does not support user-configured RSS 
and only supports packet spraying via RSS.
+- Jumbo frames
+
+
+Supported NICs
+--------------
+
+The following Nebulamatrix device models are supported by the same nbl driver:
+
+  - S1205CQ-A00CHT
+  - S1105AS-A00CHT
+  - S1055AS-A00CHT
+  - S1052AS-A00CHT
+  - S1051AS-A00CHT
+  - S1045XS-A00CHT
+  - S1205CQ-A00CSP
+  - S1055AS-A00CSP
+  - S1052AS-A00CSP
+
+
+Linux Prerequisites
+~~~~~~~~~~~~~~~~~~~
+
+This driver relies on kernel drivers for resources allocations and 
initialization.
+The following dependencies are not part of DPDK and must be installed 
separately:
+
+- **Kernel modules**
+
+  They provide low level device drivers that manage actual hardware 
initialization
+  and resources sharing with user-space processes.
+
+  Unlike most other PMDs, these modules must remain loaded and bound to
+  their devices:
+
+  - ``nbl_core``: hardware driver managing Ethernet kernel network devices.
+
+Because the nbl_core kernel driver code has not been upstreamed to the Linux 
kernel community, it cannot be provided by standard Linux distributions.
+However, the nbl_core kernel driver has been upstreamed to the openEuler and 
Anolis communities. You can obtain the nbl_core code from the following links:
+
+openEuler community:
+https://gitee.com/openeuler/kernel/pulls/11667
+
+Anolis community:
+https://gitee.com/anolis/cloud-kernel/pulls/5185
+https://gitee.com/anolis/cloud-kernel/pulls/5059
+
+Alternatively, you can contact us to obtain the nbl_core code and installation 
package.
+
+
+Prerequisites
+-------------
+
+- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>`
+  to setup the basic DPDK environment.
+
+- Learn about `Nebulamatrix Series NICs
+  <https://www.nebula-matrix.com/main>`_.
+
+
+Multiple Processes
+~~~~~~~~~~~~~~~~~~
+
+The NBL PMD does not support Multiple Processes.
+
+
+Limitations or Known Issues
+---------------------------
+
+32-bit architectures are not supported.
+
+Windows and BSD are not supported yet.
diff --git a/doc/guides/rel_notes/release_25_11.rst 
b/doc/guides/rel_notes/release_25_11.rst
index 8709784f8c..62219a5dbb 100644
--- a/doc/guides/rel_notes/release_25_11.rst
+++ b/doc/guides/rel_notes/release_25_11.rst
@@ -145,6 +145,10 @@ New Features
   * Added support for retrieving HW timestamps for Rx packets with nanosecond 
resolution.
   * Fixed PCI BAR mapping on 64K page size.
 
+* **Added Nebulamatrix nbl net driver.**
+
+  * Added the PMD for Nebulamatrix NICs.
+
 
 Removed Items
 -------------
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index 2d32068ed2..c7dae4ad27 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -41,6 +41,7 @@ drivers = [
         'mlx5',
         'mvneta',
         'mvpp2',
+        'nbl',
         'netvsc',
         'nfb',
         'nfp',
diff --git a/drivers/net/nbl/meson.build b/drivers/net/nbl/meson.build
new file mode 100644
index 0000000000..68c045a48c
--- /dev/null
+++ b/drivers/net/nbl/meson.build
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2025 NebulaMatrix Technology Co., Ltd.
+
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
+    build = false
+    reason = 'only supported on 64bit Linux'
+endif
+
+sources = files(
+        'nbl_ethdev.c',
+)
diff --git a/drivers/net/nbl/nbl_ethdev.c b/drivers/net/nbl/nbl_ethdev.c
new file mode 100644
index 0000000000..3ad8e4033a
--- /dev/null
+++ b/drivers/net/nbl/nbl_ethdev.c
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2025 Nebulamatrix Technology Co., Ltd.
+ */
diff --git a/drivers/net/nbl/nbl_include/nbl_product_base.h 
b/drivers/net/nbl/nbl_include/nbl_product_base.h
new file mode 100644
index 0000000000..648278b094
--- /dev/null
+++ b/drivers/net/nbl/nbl_include/nbl_product_base.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2025 Nebulamatrix Technology Co., Ltd.
+ */
+
+#ifndef _NBL_DEF_PRODUCT_BASE_H_
+#define _NBL_DEF_PRODUCT_BASE_H_
+
+#include "nbl_include.h"
+
+struct nbl_product_core_ops {
+       int (*hw_init)(void *p);
+       void (*hw_remove)(void *p);
+       int (*res_init)(void *p, struct rte_eth_dev *eth_dev);
+       void (*res_remove)(void *p);
+       int (*chan_init)(void *p);
+       void (*chan_remove)(void *p);
+};
+
+struct nbl_product_dev_ops {
+       int (*dev_init)(void *adapter);
+       void (*dev_uninit)(void *adapter);
+       int (*dev_start)(void *adapter);
+       void (*dev_stop)(void *adapter);
+};
+
+struct nbl_product_dispatch_ops {
+       int (*dispatch_init)(void *mgt);
+       int (*dispatch_uninit)(void *mgt);
+};
+
+#endif
-- 
2.34.1

Reply via email to