[v7,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>
---
.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
Hello Zhoumin,
It looks like Loongarch CI failed to apply this patch, but it worked
at the other labs and locally for Serhii when they were checked out to
next-net.
Maybe your CI did not choose next-net, the right branch? I remember
you saying your CI is based on a fork of the dpdk-ci repo. Perhaps the
pw_maintainers_cli.py script for choosing the right branch to apply
on, is outdated in your fork.
https://git.dpdk.org/tools/dpdk-ci/tree/tools/pw_maintainers_cli.py
Can you take a look? Thanks.
On Fri, Jul 12, 2024 at 5:49 AM Serhii Iliushyk <sil-plv@napatech.com> 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>
> ---
> .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
>
> diff --git a/.mailmap b/.mailmap
> index 552d79eaa6..aad8c552f6 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -1307,6 +1307,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>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 533f707d5f..0359368981 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -855,6 +855,13 @@ F: drivers/net/octeon_ep/
> F: doc/guides/nics/features/octeon_ep.ini
> F: doc/guides/nics/octeon_ep.rst
>
> +Napatech ntnic
> +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>
> diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini
> new file mode 100644
> index 0000000000..9ceb75a03b
> --- /dev/null
> +++ b/doc/guides/nics/features/ntnic.ini
> @@ -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
> diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
> index 7bfcac880f..c14bc7988a 100644
> --- a/doc/guides/nics/index.rst
> +++ b/doc/guides/nics/index.rst
> @@ -53,6 +53,7 @@ Network Interface Controller Drivers
> nfb
> nfp
> ngbe
> + ntnic
> null
> octeon_ep
> octeontx
> diff --git a/doc/guides/nics/ntnic.rst b/doc/guides/nics/ntnic.rst
> new file mode 100644
> index 0000000000..249d83d511
> --- /dev/null
> +++ b/doc/guides/nics/ntnic.rst
> @@ -0,0 +1,39 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> + Copyright(c) 2023 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.
> diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
> index e50afed0d5..332a959618 100644
> --- a/doc/guides/rel_notes/release_24_07.rst
> +++ b/doc/guides/rel_notes/release_24_07.rst
> @@ -154,6 +154,16 @@ New Features
>
> Added an API that allows the user to reclaim the defer queue with RCU.
>
> +* **Added Napatech ntnic experimental PMD driver.**
> +
> + * Added the experimental PMD driver
> +
> + - 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
> + - Does not support RTE flow API
>
> Removed Items
> -------------
> diff --git a/drivers/net/meson.build b/drivers/net/meson.build
> index bd38b533c5..fb6d34b782 100644
> --- a/drivers/net/meson.build
> +++ b/drivers/net/meson.build
> @@ -45,6 +45,7 @@ drivers = [
> 'nfb',
> 'nfp',
> 'ngbe',
> + 'ntnic',
> 'null',
> 'octeontx',
> 'octeon_ep',
> diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build
> new file mode 100644
> index 0000000000..194353230b
> --- /dev/null
> +++ b/drivers/net/ntnic/meson.build
> @@ -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',
> +)
> diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
> new file mode 100644
> index 0000000000..7e5231d2c1
> --- /dev/null
> +++ b/drivers/net/ntnic/ntnic_ethdev.c
> @@ -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);
> --
> 2.45.0
>
Hi Patrick,
Thanks for reminding me. The pw_maintainers_cli.py script indeed is
outdated in my fork.
I have updated this script, but still failed to apply this patch. I saw
all the other labs applied this patch based on commit of
'a6c3ec342ee105e322ffdb21e810cdfd38455c62', but I cannot find this
commit id in the history of next-net-main and next-net-for-main from the
latest update. Did I miss one there?
It seems that this series should rebase on the latest update of next-net
(see below).
On Fri, July 12, 2024 at 1:54PM, Patrick Robb wrote:
> Hello Zhoumin,
>
> It looks like Loongarch CI failed to apply this patch, but it worked
> at the other labs and locally for Serhii when they were checked out to
> next-net.
>
> Maybe your CI did not choose next-net, the right branch? I remember
> you saying your CI is based on a fork of the dpdk-ci repo. Perhaps the
> pw_maintainers_cli.py script for choosing the right branch to apply
> on, is outdated in your fork.
> https://git.dpdk.org/tools/dpdk-ci/tree/tools/pw_maintainers_cli.py
>
> Can you take a look? Thanks.
>
> On Fri, Jul 12, 2024 at 5:49 AM Serhii Iliushyk <sil-plv@napatech.com> 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>
>> ---
>> .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
>>
>> diff --git a/.mailmap b/.mailmap
>> index 552d79eaa6..aad8c552f6 100644
>> --- a/.mailmap
>> +++ b/.mailmap
>> @@ -1307,6 +1307,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>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 533f707d5f..0359368981 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -855,6 +855,13 @@ F: drivers/net/octeon_ep/
>> F: doc/guides/nics/features/octeon_ep.ini
>> F: doc/guides/nics/octeon_ep.rst
>>
>> +Napatech ntnic
>> +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>
>> diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini
>> new file mode 100644
>> index 0000000000..9ceb75a03b
>> --- /dev/null
>> +++ b/doc/guides/nics/features/ntnic.ini
>> @@ -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
>> diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
>> index 7bfcac880f..c14bc7988a 100644
>> --- a/doc/guides/nics/index.rst
>> +++ b/doc/guides/nics/index.rst
>> @@ -53,6 +53,7 @@ Network Interface Controller Drivers
>> nfb
>> nfp
>> ngbe
>> + ntnic
>> null
>> octeon_ep
>> octeontx
>> diff --git a/doc/guides/nics/ntnic.rst b/doc/guides/nics/ntnic.rst
>> new file mode 100644
>> index 0000000000..249d83d511
>> --- /dev/null
>> +++ b/doc/guides/nics/ntnic.rst
>> @@ -0,0 +1,39 @@
>> +.. SPDX-License-Identifier: BSD-3-Clause
>> + Copyright(c) 2023 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.
>> diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
>> index e50afed0d5..332a959618 100644
>> --- a/doc/guides/rel_notes/release_24_07.rst
>> +++ b/doc/guides/rel_notes/release_24_07.rst
>> @@ -154,6 +154,16 @@ New Features
>>
>> Added an API that allows the user to reclaim the defer queue with RCU.
The above sentence had been modified in the commit of
'a40ac9bcd85c840aec776729f950663d3a61eaf5' as following:
-* **Added defer queue reclamation in the hash library.**
+* **Updated the hash library.**
- Added an API that allows the user to reclaim the defer queue with RCU.
+ * Added defer queue reclamation via RCU.
+ * Added SVE support for bulk lookup.
Best regards,
Min Zhou
>> +* **Added Napatech ntnic experimental PMD driver.**
>> +
>> + * Added the experimental PMD driver
>> +
>> + - 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
>> + - Does not support RTE flow API
>>
>> Removed Items
>> -------------
>> diff --git a/drivers/net/meson.build b/drivers/net/meson.build
>> index bd38b533c5..fb6d34b782 100644
>> --- a/drivers/net/meson.build
>> +++ b/drivers/net/meson.build
>> @@ -45,6 +45,7 @@ drivers = [
>> 'nfb',
>> 'nfp',
>> 'ngbe',
>> + 'ntnic',
>> 'null',
>> 'octeontx',
>> 'octeon_ep',
>> diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build
>> new file mode 100644
>> index 0000000000..194353230b
>> --- /dev/null
>> +++ b/drivers/net/ntnic/meson.build
>> @@ -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',
>> +)
>> diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
>> new file mode 100644
>> index 0000000000..7e5231d2c1
>> --- /dev/null
>> +++ b/drivers/net/ntnic/ntnic_ethdev.c
>> @@ -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);
>> --
>> 2.45.0
>>
Hi Min Zhou,
I am seeing that commit for next-net:
https://git.dpdk.org/next/dpdk-next-net/commit/?id=a6c3ec342ee105e322ffdb21e810cdfd38455c62
If you try to manually apply it on next-net, does it work?
Pasting the logs from our apply process below for context:
```
Trying to checkout branch: origin/next-net-for-main
Checked out to next-net-for-main (a6c3ec342ee105e322ffdb21e810cdfd38455c62)
Applying patch...
Applying: net/ntnic: add ethdev and makes PMD available
Applying: net/ntnic: add logging implementation
Applying: net/ntnic: add minimal initialization for PCI device
Applying: net/ntnic: add NT utilities implementation
Applying: net/ntnic: add VFIO module
Applying: net/ntnic: add basic eth dev ops to ntnic
Applying: net/ntnic: add core platform structures
Applying: net/ntnic: add adapter initialization
Applying: net/ntnic: add registers and FPGA model for NapaTech NIC
Applying: net/ntnic: add FPGA modules for initialization
Applying: net/ntnic: add FPGA initialization functionality
Applying: net/ntnic: add support of the NT200A0X smartNIC
Applying: net/ntnic: add startup and reset sequence for NT200A0X
Applying: net/ntnic: add clock profile for the NT200A0X smartNIC
Applying: net/ntnic: add link management skeleton
Applying: net/ntnic: add link 100G module ops
Applying: net/ntnic: add generic NIM and I2C modules
Applying: net/ntnic: add QSFP support
Applying: net/ntnic: add QSFP28 support
Applying: net/ntnic: add GPIO communication for NIMs
Applying: net/ntnic: add physical layer control module
Running test build...
The Meson build system
```
Hi Patrick,
Thanks for giving the link of commit `a6c3ec342ee1`.
However I cannot checkout this commit in the next-net repository because
the commit ID is not exist in the history of next-net repository. Could
you find it?
It seems that the commit `a6c3ec342ee1` is nearly identical to the
commit `62edcfd6ea3c` except the minor change in the subjects as following:
https://git.dpdk.org/next/dpdk-next-net/commit/?id=62edcfd6ea3c61639df68e4a315046d09f462e8c
I'm able to checkout the commit `62edcfd6ea3c` in the next-net
repository but fail to apply this series, because this series conflicts
with the commit `a40ac9bcd85c`.
Despite all this, I can apply this series successfully on the artifact
of commit `a6c3ec342ee1`:
https://git.dpdk.org/next/dpdk-next-net/snapshot/dpdk-next-net-a6c3ec342ee105e322ffdb21e810cdfd38455c62.zip
Loongson lab always tries to update the local repository with the
upstream before testing the series, and just applies the downloaded
series to the local repository. So it's possible to skip some commits in
Loongson lab when chooses the base for applying.
Best regards,
Min Zhou
On Mon, Jul, 15, 2024 at 3:39PM, Patrick Robb wrote:
> Hi Min Zhou,
>
> I am seeing that commit for next-net:
> https://git.dpdk.org/next/dpdk-next-net/commit/?id=a6c3ec342ee105e322ffdb21e810cdfd38455c62
>
> If you try to manually apply it on next-net, does it work?
>
> Pasting the logs from our apply process below for context:
>
> ```
>
> Trying to checkout branch: origin/next-net-for-main
> Checked out to next-net-for-main (a6c3ec342ee105e322ffdb21e810cdfd38455c62)
> Applying patch...
>
> Applying: net/ntnic: add ethdev and makes PMD available
> Applying: net/ntnic: add logging implementation
> Applying: net/ntnic: add minimal initialization for PCI device
> Applying: net/ntnic: add NT utilities implementation
> Applying: net/ntnic: add VFIO module
> Applying: net/ntnic: add basic eth dev ops to ntnic
> Applying: net/ntnic: add core platform structures
> Applying: net/ntnic: add adapter initialization
> Applying: net/ntnic: add registers and FPGA model for NapaTech NIC
> Applying: net/ntnic: add FPGA modules for initialization
> Applying: net/ntnic: add FPGA initialization functionality
> Applying: net/ntnic: add support of the NT200A0X smartNIC
> Applying: net/ntnic: add startup and reset sequence for NT200A0X
> Applying: net/ntnic: add clock profile for the NT200A0X smartNIC
> Applying: net/ntnic: add link management skeleton
> Applying: net/ntnic: add link 100G module ops
> Applying: net/ntnic: add generic NIM and I2C modules
> Applying: net/ntnic: add QSFP support
> Applying: net/ntnic: add QSFP28 support
> Applying: net/ntnic: add GPIO communication for NIMs
> Applying: net/ntnic: add physical layer control module
>
>
> Running test build...
> The Meson build system
>
> ```
On Mon, Jul 15, 2024 at 10:38 PM zhoumin <zhoumin@loongson.cn> wrote:
>
> Hi Patrick,
>
> Thanks for giving the link of commit `a6c3ec342ee1`.
>
> However I cannot checkout this commit in the next-net repository because
> the commit ID is not exist in the history of next-net repository. Could
> you find it?
>
> It seems that the commit `a6c3ec342ee1` is nearly identical to the
> commit `62edcfd6ea3c` except the minor change in the subjects as following:
>
> https://git.dpdk.org/next/dpdk-next-net/commit/?id=62edcfd6ea3c61639df68e4a315046d09f462e8c
>
Thanks Min Zhou, I see what you mean. I guess Ferruh amended a commit
and force pushed to the next-net branch? Otherwise I'm not sure what
happened.
In any case, it looks like for the v9 submission you checked out to a
valid commit on next-net, so I think we're good.
Thanks for updating your dpdk-ci repo!
On 7/17/2024 2:44 PM, Patrick Robb wrote:
> On Mon, Jul 15, 2024 at 10:38 PM zhoumin <zhoumin@loongson.cn> wrote:
>>
>> Hi Patrick,
>>
>> Thanks for giving the link of commit `a6c3ec342ee1`.
>>
>> However I cannot checkout this commit in the next-net repository because
>> the commit ID is not exist in the history of next-net repository. Could
>> you find it?
>>
>> It seems that the commit `a6c3ec342ee1` is nearly identical to the
>> commit `62edcfd6ea3c` except the minor change in the subjects as following:
>>
>> https://git.dpdk.org/next/dpdk-next-net/commit/?id=62edcfd6ea3c61639df68e4a315046d09f462e8c
>>
>
> Thanks Min Zhou, I see what you mean. I guess Ferruh amended a commit
> and force pushed to the next-net branch? Otherwise I'm not sure what
> happened.
>
I re-write next-net history a few times around -rc1, it must be the reason.
> In any case, it looks like for the v9 submission you checked out to a
> valid commit on next-net, so I think we're good.
>
> Thanks for updating your dpdk-ci repo!
>
loongarch build is fine now, thanks Min, Patrick for taking care of it.
@@ -1307,6 +1307,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>
@@ -855,6 +855,13 @@ F: drivers/net/octeon_ep/
F: doc/guides/nics/features/octeon_ep.ini
F: doc/guides/nics/octeon_ep.rst
+Napatech ntnic
+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) 2023 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.
@@ -154,6 +154,16 @@ New Features
Added an API that allows the user to reclaim the defer queue with RCU.
+* **Added Napatech ntnic experimental PMD driver.**
+
+ * Added the experimental PMD driver
+
+ - 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
+ - Does not support RTE flow API
Removed Items
-------------
@@ -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);