From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95345455F3; Sat, 13 Jul 2024 04:47:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 698F44042E; Sat, 13 Jul 2024 04:47:05 +0200 (CEST) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id 80D1C402C6 for ; Sat, 13 Jul 2024 04:47:03 +0200 (CEST) Received: from loongson.cn (unknown [10.20.42.74]) by gateway (Coremail) with SMTP id _____8DxPOuj6pFmhu8DAA--.10830S3; Sat, 13 Jul 2024 10:46:59 +0800 (CST) Received: from [10.20.42.74] (unknown [10.20.42.74]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxDMed6pFmvdRGAA--.29854S3; Sat, 13 Jul 2024 10:46:56 +0800 (CST) Subject: Re: [PATCH v7 01/21] net/ntnic: add ethdev and makes PMD available To: Patrick Robb Cc: dev@dpdk.org, mko-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, Thomas Monjalon , Serhii Iliushyk References: <20240530144929.4127931-1-sil-plv@napatech.com> <20240712094831.861260-1-sil-plv@napatech.com> From: zhoumin Message-ID: <9a9380f2-4136-bfae-9f28-518d28ed3c34@loongson.cn> Date: Sat, 13 Jul 2024 02:45:13 +0000 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8AxDMed6pFmvdRGAA--.29854S3 X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/1tbiAQARAWaR3ZgAGAACs5 X-Coremail-Antispam: 1Uk129KBj93XoW3JF1DKw13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-e5UU UUU== X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 wrote: >> Add initial ntnic ethdev skeleton and register PCI probe functions >> Update documentation: Device description and feature list >> >> Signed-off-by: Serhii Iliushyk >> --- >> .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 Mironov >> Sergey Temerkhanov >> Sergio Gonzalez Monroy >> +Serhii Iliushyk >> Seth Arnold >> Seth Howell >> Shachar Beiser >> 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 >> +M: Serhii Iliushyk >> +F: drivers/net/ntnic/ >> +F: doc/guides/nics/ntnic.rst >> +F: doc/guides/nics/features/ntnic.ini >> + >> NVIDIA mlx4 >> M: Matan Azrad >> M: Viacheslav Ovsiienko >> 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 >> +#include >> +#include >> + >> +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 >>