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 3FC244560E; Fri, 12 Jul 2024 15:54:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18AB240653; Fri, 12 Jul 2024 15:54:48 +0200 (CEST) Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) by mails.dpdk.org (Postfix) with ESMTP id 31197402CB for ; Fri, 12 Jul 2024 15:54:47 +0200 (CEST) Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5c1d2f7ab69so1111365eaf.3 for ; Fri, 12 Jul 2024 06:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720792486; x=1721397286; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+qmqRjOcZEU9Wivsr0/Tbbbt3YNP0bgGqSiKc7d49R0=; b=gKyP+ndDORMzpaQgr+FH+gruThz0Yu/6eWlGratyJ/idk9guTpwdBzFEqjNduclJxV 7wTYYejqDDd+nuzAg+z2sZ72PAZBV+veou36cuqJEAV+C62q6tasfsStnaP6r3EUU+Mu E3haBXdWzQFROyFzwk73eA27vqmFiyxwU3Bpc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720792486; x=1721397286; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+qmqRjOcZEU9Wivsr0/Tbbbt3YNP0bgGqSiKc7d49R0=; b=MCMDfCdHoP7q277kPQz+TlYvNYGpg/JFxlua448z9xwsoC2c3gK5wwSiMVdIVZxnWq Ug3dSIRbS3aURT9EmW4I8ZH9hq2iLaQjus6xeCLbEojrUXDEx8Oqr104O5RxLuBw7n60 w2JNuWpBLOn+Ck0bDn+9WYJ/3Ks905tOERS7W9gUmRN2XA7HeyrrlpS1OAJ7ucifBcGE 3OjiHH2JCZKZPbX/vpGCf0BJryUoCl/ZQe4/53lZchOvxDJQCo68uIH79g0geOpYGqoF kEq5P7EHCu1KUJzMaLuyiUCTneC+1sTnGHYWACtFKSE00tUHGcg+7tyzQvgWf0PL7EiT 1AHg== X-Gm-Message-State: AOJu0Yw9f+0QUTGoWDQlEak6LFBFUVLSPIMkR4I8aZd0GDO2ko2ESLGt e21mdBsFRbPCYOpS/Bm/IVBEwKDW1Dw6A1kKlw4Eh1nNm9NdRZhRVFB54SfMMJrgGXPza3/CWh3 GbdeRM6D6QescHF4WhwKiUnXe2iSUmBnDnMlSqw== X-Google-Smtp-Source: AGHT+IFHoZNqyVcCsXWYVmRGPkb3BUHV5IGv6m0dHSQscjaSfyGUy9erxfYuBzGtEKBjGPXvycuGin69Y+c0szT4Dkc= X-Received: by 2002:a05:6820:8c2:b0:5c7:ae9d:7894 with SMTP id 006d021491bc7-5ccdebc3acamr2475025eaf.5.1720792486283; Fri, 12 Jul 2024 06:54:46 -0700 (PDT) MIME-Version: 1.0 References: <20240530144929.4127931-1-sil-plv@napatech.com> <20240712094831.861260-1-sil-plv@napatech.com> In-Reply-To: <20240712094831.861260-1-sil-plv@napatech.com> From: Patrick Robb Date: Fri, 12 Jul 2024 09:54:35 -0400 Message-ID: Subject: Re: [PATCH v7 01/21] net/ntnic: add ethdev and makes PMD available To: zhoumin Cc: dev@dpdk.org, mko-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, Thomas Monjalon , Serhii Iliushyk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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=E2=80=AFAM 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/feature= s/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 =3D Y > +x86-64 =3D 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 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +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 s= pecial > +Napatech kernel modules. > + > +The Napatech smartNIC presents one control PCI device (PF0). NTNIC PMD a= ccesses > +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 v= fio-pci > +support for creating VFs from the PF which is required for the PMD to us= e > +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 k= ernel > +version 4.18 is supported. > diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_note= s/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 =3D [ > 'nfb', > 'nfp', > 'ngbe', > + 'ntnic', > 'null', > 'octeontx', > 'octeon_ep', > diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.buil= d > 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 =3D false > + reason =3D 'only supported on x86_64 Linux' > + subdir_done() > +endif > + > +# includes > +includes =3D [ > + include_directories('.'), > +] > + > +# all sources > +sources =3D files( > + 'ntnic_ethdev.c', > +) > diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_e= thdev.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[] =3D { > + { > + .vendor_id =3D 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 =3D 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_deini= t); > +} > + > +static struct rte_pci_driver rte_nthw_pmd =3D { > + .id_table =3D nthw_pci_id_map, > + .probe =3D nthw_pci_probe, > + .remove =3D nthw_pci_remove, > +}; > + > +RTE_PMD_REGISTER_PCI(net_ntnic, rte_nthw_pmd); > -- > 2.45.0 >