net/ngbe: add build and doc infrastructure
authorJiawen Wu <jiawenwu@trustnetic.com>
Thu, 8 Jul 2021 09:32:21 +0000 (17:32 +0800)
committerAndrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru>
Mon, 12 Jul 2021 15:55:19 +0000 (17:55 +0200)
Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for ngbe PMD.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
MAINTAINERS
doc/guides/nics/features/ngbe.ini [new file with mode: 0644]
doc/guides/nics/index.rst
doc/guides/nics/ngbe.rst [new file with mode: 0644]
doc/guides/rel_notes/release_21_08.rst
drivers/net/meson.build
drivers/net/ngbe/meson.build [new file with mode: 0644]
drivers/net/ngbe/ngbe_ethdev.c [new file with mode: 0644]
drivers/net/ngbe/version.map [new file with mode: 0644]

index f4dc2d7..af2a91d 100644 (file)
@@ -903,6 +903,12 @@ F: drivers/net/sfc/
 F: doc/guides/nics/sfc_efx.rst
 F: doc/guides/nics/features/sfc.ini
 
+Wangxun ngbe
+M: Jiawen Wu <jiawenwu@trustnetic.com>
+F: drivers/net/ngbe/
+F: doc/guides/nics/ngbe.rst
+F: doc/guides/nics/features/ngbe.ini
+
 Wangxun txgbe
 M: Jiawen Wu <jiawenwu@trustnetic.com>
 M: Jian Wang <jianwang@trustnetic.com>
diff --git a/doc/guides/nics/features/ngbe.ini b/doc/guides/nics/features/ngbe.ini
new file mode 100644 (file)
index 0000000..a7a524d
--- /dev/null
@@ -0,0 +1,10 @@
+;
+; Supported features of the 'ngbe' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Linux                = Y
+ARMv8                = Y
+x86-32               = Y
+x86-64               = Y
index c1a04d9..784d5d3 100644 (file)
@@ -48,6 +48,7 @@ Network Interface Controller Drivers
     netvsc
     nfb
     nfp
+    ngbe
     null
     octeontx
     octeontx2
diff --git a/doc/guides/nics/ngbe.rst b/doc/guides/nics/ngbe.rst
new file mode 100644 (file)
index 0000000..be50218
--- /dev/null
@@ -0,0 +1,31 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
+
+NGBE Poll Mode Driver
+=====================
+
+The NGBE PMD (librte_pmd_ngbe) provides poll mode driver support
+for Wangxun 1 Gigabit Ethernet NICs.
+
+
+Prerequisites
+-------------
+
+- Learning about Wangxun 1 Gigabit Ethernet NICs using
+  `<https://www.net-swift.com/a/386.html>`_.
+
+- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
+
+
+Driver compilation and testing
+------------------------------
+
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
+
+
+Limitations or Known issues
+---------------------------
+
+Build with ICC is not supported yet.
+Power8, ARMv7 and BSD are not supported yet.
index 6a902ef..efcb0f3 100644 (file)
@@ -89,6 +89,11 @@ New Features
   * Added support for meter hierarchy.
   * Added devargs options ``allow_duplicate_pattern``.
 
+* **Added Wangxun ngbe PMD.**
+
+  Added a new PMD driver for Wangxun 1 Gigabit Ethernet NICs.
+  See the :doc:`../nics/ngbe` for more details.
+
 * **Added support for Marvell CNXK crypto driver.**
 
   * Added cnxk crypto PMD which provides support for an integrated
index 4e9fa98..bcf488f 100644 (file)
@@ -41,6 +41,7 @@ drivers = [
         'netvsc',
         'nfb',
         'nfp',
+        'ngbe',
         'null',
         'octeontx',
         'octeontx2',
diff --git a/drivers/net/ngbe/meson.build b/drivers/net/ngbe/meson.build
new file mode 100644 (file)
index 0000000..d5022a2
--- /dev/null
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
+
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
+sources = files(
+        'ngbe_ethdev.c',
+)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
new file mode 100644 (file)
index 0000000..eef9b9b
--- /dev/null
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
+ * Copyright(c) 2010-2017 Intel Corporation
+ */
+
+#include <errno.h>
+#include <rte_common.h>
+#include <ethdev_pci.h>
+
+static int
+eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv,
+               struct rte_pci_device *pci_dev)
+{
+       RTE_SET_USED(pci_drv);
+       RTE_SET_USED(pci_dev);
+       return -EINVAL;
+}
+
+static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+{
+       RTE_SET_USED(pci_dev);
+       return -EINVAL;
+}
+
+static struct rte_pci_driver rte_ngbe_pmd = {
+       .probe = eth_ngbe_pci_probe,
+       .remove = eth_ngbe_pci_remove,
+};
+
+RTE_PMD_REGISTER_PCI(net_ngbe, rte_ngbe_pmd);
diff --git a/drivers/net/ngbe/version.map b/drivers/net/ngbe/version.map
new file mode 100644 (file)
index 0000000..4a76d1d
--- /dev/null
@@ -0,0 +1,3 @@
+DPDK_21 {
+       local: *;
+};