[v10,01/21] net/ntnic: add ethdev and makes PMD available
Checks
Commit Message
Add initial ntnic ethdev skeleton and register PCI probe functions
Update documentation: Device description and feature list
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
v6
* Remove unused includes
* Remove EOF markers
* Remove unnecesarry commpiller flags
* Update documentation INI and RST files
* Remove uncovered features
* Add features according to DPDK reqirements
* Add link on NT200A02 description
* Rename res(short for result) to ret(short for return)
* Fix unnecessary set of the driver name
* The driver name is set by macro RTE_PMD_REGISTER_PCI
* Set sentinel value for PCI id_table
* NULL value can lead to the crush on function rte_pci_match
* Remove unnecessary comments
v7
* Move features list to the dedicated patches
* Update release note file
v9
* Marked driver features as Experimantal
v10
* Use 8 spaces as indentation in meson
---
.mailmap | 1 +
MAINTAINERS | 7 ++++
doc/guides/nics/features/ntnic.ini | 8 +++++
doc/guides/nics/index.rst | 1 +
doc/guides/nics/ntnic.rst | 39 ++++++++++++++++++++
doc/guides/rel_notes/release_24_07.rst | 10 ++++++
drivers/net/meson.build | 1 +
drivers/net/ntnic/meson.build | 18 ++++++++++
drivers/net/ntnic/ntnic_ethdev.c | 49 ++++++++++++++++++++++++++
9 files changed, 134 insertions(+)
create mode 100644 doc/guides/nics/features/ntnic.ini
create mode 100644 doc/guides/nics/ntnic.rst
create mode 100644 drivers/net/ntnic/meson.build
create mode 100644 drivers/net/ntnic/ntnic_ethdev.c
Comments
On 7/17/2024 2:32 PM, Serhii Iliushyk wrote:
> Add initial ntnic ethdev skeleton and register PCI probe functions
> Update documentation: Device description and feature list
>
> Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
>
For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
Series applied to dpdk-next-net/main, thanks.
On 7/18/2024 10:43 PM, Ferruh Yigit wrote:
> On 7/17/2024 2:32 PM, Serhii Iliushyk wrote:
>> Add initial ntnic ethdev skeleton and register PCI probe functions
>> Update documentation: Device description and feature list
>>
>> Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
>>
>
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
>
> Series applied to dpdk-next-net/main, thanks.
>
Hi Serhii,
Thomas highlighted that some files in the driver missing SPDX tag, they
can be viewed with './devtools/check-spdx-tag.sh' tool, can you please
check them?
I am not sure about the auto-generated files, @Thomas and @Hemant can
comment more, but at least for rest can you please send a patch to add
license and copyright?
23/07/2024 09:49, Ferruh Yigit:
> On 7/18/2024 10:43 PM, Ferruh Yigit wrote:
> Thomas highlighted that some files in the driver missing SPDX tag, they
> can be viewed with './devtools/check-spdx-tag.sh' tool, can you please
> check them?
When getting the next-net tree into main,
I've added exceptions for ntnic files in the script
in order to continue using it for checking new patches.
I think it would be better to remove such exceptions.
> I am not sure about the auto-generated files, @Thomas and @Hemant can
> comment more, but at least for rest can you please send a patch to add
> license and copyright?
@@ -1321,6 +1321,7 @@ Sergey Madaminov <sergey.madaminov@gmail.com>
Sergey Mironov <grrwlf@gmail.com>
Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
+Serhii Iliushyk <sil-plv@napatech.com>
Seth Arnold <seth.arnold@canonical.com>
Seth Howell <seth.howell@intel.com>
Shachar Beiser <shacharbe@mellanox.com>
@@ -856,6 +856,13 @@ F: drivers/net/octeon_ep/
F: doc/guides/nics/features/octeon_ep.ini
F: doc/guides/nics/octeon_ep.rst
+Napatech ntnic - EXPERIMENTAL
+M: Christian Koue Muf <ckm@napatech.com>
+M: Serhii Iliushyk <sil-plv@napatech.com>
+F: drivers/net/ntnic/
+F: doc/guides/nics/ntnic.rst
+F: doc/guides/nics/features/ntnic.ini
+
NVIDIA mlx4
M: Matan Azrad <matan@nvidia.com>
M: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
new file mode 100644
@@ -0,0 +1,8 @@
+;
+; Supported features of the 'ntnic' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Linux = Y
+x86-64 = Y
@@ -53,6 +53,7 @@ Network Interface Controller Drivers
nfb
nfp
ngbe
+ ntnic
null
octeon_ep
octeontx
new file mode 100644
@@ -0,0 +1,39 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright(c) 2024 Napatech A/S
+
+NTNIC Poll Mode Driver
+======================
+
+The NTNIC PMD provides poll mode driver support for Napatech smartNICs.
+
+
+Design
+------
+
+The NTNIC PMD is designed as a pure user-space driver, and requires no special
+Napatech kernel modules.
+
+The Napatech smartNIC presents one control PCI device (PF0). NTNIC PMD accesses
+smartNIC PF0 via vfio-pci kernel driver. Access to PF0 for all purposes is
+exclusive, so only one process should access it. The physical ports are located
+behind PF0 as DPDK port 0 and 1.
+
+
+Supported NICs
+--------------
+
+- NT200A02 2x100G SmartNIC
+
+ - FPGA ID 9563 (Inline Flow Management)
+
+All information about NT200A02 can be found by link below:
+https://www.napatech.com/products/nt200a02-smartnic-inline/
+
+Limitations
+~~~~~~~~~~~
+
+Kernel versions before 5.7 are not supported. Kernel version 5.7 added vfio-pci
+support for creating VFs from the PF which is required for the PMD to use
+vfio-pci on the PF. This support has been back-ported to older Linux
+distributions and they are also supported. If vfio-pci is not required kernel
+version 4.18 is supported.
@@ -104,6 +104,16 @@ New Features
* Updated base code with E610 device family support.
+* **Added Napatech ntnic net driver [EXPERIMENTAL].**
+
+ * Added the PMD driver for Napatech smartNIC
+
+ - Ability to initialize the NIC (NT200A02)
+ - Supporting only one FPGA firmware (9563.55.39)
+ - Ability to bring up the 100G link
+ - Supporting QSFP/QSFP+/QSFP28 NIM
+ - Does not support datapath
+
* **Updated Marvell cnxk net driver.**
* Added support disabling custom meta aura
@@ -45,6 +45,7 @@ drivers = [
'nfb',
'nfp',
'ngbe',
+ 'ntnic',
'null',
'octeontx',
'octeon_ep',
new file mode 100644
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
+ build = false
+ reason = 'only supported on x86_64 Linux'
+ subdir_done()
+endif
+
+# includes
+includes = [
+ include_directories('.'),
+]
+
+# all sources
+sources = files(
+ 'ntnic_ethdev.c',
+)
new file mode 100644
@@ -0,0 +1,49 @@
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include <rte_ethdev.h>
+#include <rte_bus_pci.h>
+#include <ethdev_pci.h>
+
+static const struct rte_pci_id nthw_pci_id_map[] = {
+ {
+ .vendor_id = 0,
+ }, /* sentinel */
+};
+
+static int
+nthw_pci_dev_init(struct rte_pci_device *pci_dev __rte_unused)
+{
+ return 0;
+}
+
+static int
+nthw_pci_dev_deinit(struct rte_eth_dev *eth_dev __rte_unused)
+{
+ return 0;
+}
+
+static int
+nthw_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+ struct rte_pci_device *pci_dev)
+{
+ int ret;
+ ret = nthw_pci_dev_init(pci_dev);
+ return ret;
+}
+
+static int
+nthw_pci_remove(struct rte_pci_device *pci_dev)
+{
+ return rte_eth_dev_pci_generic_remove(pci_dev, nthw_pci_dev_deinit);
+}
+
+static struct rte_pci_driver rte_nthw_pmd = {
+ .id_table = nthw_pci_id_map,
+ .probe = nthw_pci_probe,
+ .remove = nthw_pci_remove,
+};
+
+RTE_PMD_REGISTER_PCI(net_ntnic, rte_nthw_pmd);