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 19ED745635; Wed, 17 Jul 2024 15:35:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F37FF42DF1; Wed, 17 Jul 2024 15:33:50 +0200 (CEST) Received: from egress-ip11a.ess.de.barracuda.com (egress-ip11a.ess.de.barracuda.com [18.184.203.234]) by mails.dpdk.org (Postfix) with ESMTP id 65437427DF for ; Wed, 17 Jul 2024 15:33:36 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02lp2105.outbound.protection.outlook.com [104.47.11.105]) by mx-outbound13-209.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Jul 2024 13:33:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gmDSljFwiOWBtltmbgx/mrjevv//EqeEdtIEFstrmzp0xfnMWkUO9Klh4IWwSffeibANGNn8HlpGqDdln2yTRv9+kRWFuOdL03JZmu5h42eQz5ANShRe27hurO2f+vDeuibVbp28De98tyMiS/VzLN2BWAwg7mnIMntZ8xkbg5VZ8JWzgHFogZIDPrNfDFNHV2zlQZ1JOO3UbZrAAMCofF1+JQZfDh5L6oURh4jYHiUl25d2E36bMlmOS/KOT3yHCR73IzHeCIoXI30nefmSEJLAljF1f0mduDaKItVXbFR6n/Y4cPYsVUBwhhAiwoz9kxkajcZ30rfNX23LvJwtRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=b2CHRt/IeirlIAg384R3J7LEPccK2iXRZ8vFl2hOdc0=; b=xt1vlK/sur5fugsaI+O4+Xx6uEwEwTr+yHpM3AlDRVUzpjdRsFnYhsi2eePe1s+ugQQbzfFPk2TXtrHrPJ4kXbmqYpm7FpfHFvZzCGCsUrEkMNoz3l87EQ2QXfl/l/c2nNRxGEqqxvRz1y7v2KvxMyQvGV25n6iD1/IMsTIxRW1jza1P/Nk+j0rxLhbGZnwbefHexk97qZvxS7alsTqpCtL0AWRYauwSPgzq6L0rEoMfbOf1ADRhAO5GJwHOG7JDRMLVMUFUqIY8TzqCRc3me2za+J5EBP1wQWu5M4WgvaOntTB/PKbR9DnzZiXByriEKpzLshNlUjGxbgPuggLmIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b2CHRt/IeirlIAg384R3J7LEPccK2iXRZ8vFl2hOdc0=; b=fScKvIhZy+u+MVQ7ub/LcCQDH7/p1P/Wen08KRRd9511RCFPyJ6Qd8hOoX6o2Bw423ezY3GLirIrVQEMhgijcZaoTiLnLyRgNGtUFc0zaheMDzj5gDEXSY3AP/6f+N6F3eKos7CYFolLL1hDoiPSApmedZbVdQn3gVuQeBDiCoA= Received: from AM0PR04CA0106.eurprd04.prod.outlook.com (2603:10a6:208:be::47) by VE1P190MB0974.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:1ac::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.31; Wed, 17 Jul 2024 13:33:17 +0000 Received: from AM3PEPF0000A799.eurprd04.prod.outlook.com (2603:10a6:208:be:cafe::d7) by AM0PR04CA0106.outlook.office365.com (2603:10a6:208:be::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29 via Frontend Transport; Wed, 17 Jul 2024 13:33:16 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM3PEPF0000A799.mail.protection.outlook.com (10.167.16.104) with Microsoft SMTP Server id 15.20.7784.11 via Frontend Transport; Wed, 17 Jul 2024 13:33:15 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, Thomas Monjalon Subject: [PATCH v10 01/21] net/ntnic: add ethdev and makes PMD available Date: Wed, 17 Jul 2024 15:32:48 +0200 Message-ID: <20240717133313.3104239-1-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240530144929.4127931-1-sil-plv@napatech.com> References: <20240530144929.4127931-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM3PEPF0000A799:EE_|VE1P190MB0974:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: cad7c0a3-31f3-4c38-42c7-08dca6650353 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?kbXPM8y3b4FM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g8AP?= =?us-ascii?Q?SmeMJb+419f3o+uX9jyAnBilqqoV09YZze3L7aqDbIPXK7s2EpBTCaSgLKz2?= =?us-ascii?Q?xRSZu3XixNFOgc5RPLoYSoo8Tmkjz5hpZp/x93ToDgXoePEuMaNLaABTtj0F?= =?us-ascii?Q?1QmDqci+PQZOzxJYJTuU2D+G+lZlfPXztTV+wVcxYs9lG0MP5TfAVywyomx/?= =?us-ascii?Q?bX3q76asoyogrDpl6m1+eEubDg8zwqz0ufGGQIj1cqrUL4/RefsQa9pd0idf?= =?us-ascii?Q?vuuIFjU/xA9imgKmPItDq/EVp8vkU42uqB/nVQ+/9m651MhjDuKKpDfxTb8h?= =?us-ascii?Q?h4SOEh5RS+XCwit/cAwYmrazJ6mlPCtwolbeANhiS2gsUp8Dd5iweqUd9ZP3?= =?us-ascii?Q?ZB9g6t8j05LYa05O9lVzMG2YVqPwAns8MkJdVplgirY8iK1jJWkIFvdsqzGE?= =?us-ascii?Q?BXuFhAuut6fYAlWuQYIOoADhkPNxQhyQ82tsGOyt7IWT0Zng9PHWXFK2tFas?= =?us-ascii?Q?gpMRBMIUYtfkUBstjbVeeC2QZHOf?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: bGSdC/A03gvfA7PIZUnSy5rEiK/I47aOD7zAwX1A9gwML/6ZQHyOFq5nyOPxxC1iscKlFR/rpK2t/TRcy8CD39yGqVMyqe21mimGUCqh3fip4Sdkuqe+brejZWrnEG6NKfeMEfioz3RLY36YuxX9CacBeOVMu+zBijsFHZvY9YOZP5iwxyaSUep98vaDMQ8RXg8jA9b1u0IpzhPj53r9WzC8nprfWtBH0Rw5a4q8IWGNilECc/tAChvzhPU3lX2yE2CAe9ZwNOqP/jiAaeEQRzVqLOJbfUsdyUYX20eO60gccHKDG0k5/6NqUMuhrds+tbwYR/Twk/9IBxTRgGO1aznTvKpiuMubpEK3BXiYu+0hftycPXRI384R4GgoV9DpgriCsItzv1wJzm/ryZZcHsslU/isHcXPjBfWIlJGsbS97hJCnwnlBzIbdBYDuCuIpi02iLCau3FjF0pBT225zMqZyIcddcyB9JSI1gFIM2a26k3lZW6hBb4jYmLvuFpOGlh340yZ+zs3afjxkOe3zjN6crWQKWh02tlMgfmNdXpkGgyUukS96JAAFuvR84xudaLXcOqhMXKf4WAHtebRs/HKNLV6ekj79ssZLb7aAIDmvZ2zmqgf52E9LLY+5eP/GPgli64R6rNcJaCjmD8tkw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2024 13:33:15.5744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cad7c0a3-31f3-4c38-42c7-08dca6650353 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A799.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1P190MB0974 X-BESS-ID: 1721223200-303537-12655-15872-2 X-BESS-VER: 2019.1_20240716.1757 X-BESS-Apparent-Source-IP: 104.47.11.105 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVuamxiZAVgZQ0CTV0NLY0iTR0t LczMTc1NDULNnILCnFODkxzcjC0tRQqTYWAPZNWipBAAAA X-BESS-Outbound-Spam-Score: 0.51 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.257687 [from cloudscan21-34.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.01 BSF_SC7_SG0146_1 META: Custom rule SG0146_1 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.51 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_SC7_SG0146_1, BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 Add initial ntnic ethdev skeleton and register PCI probe functions Update documentation: Device description and feature list Signed-off-by: Serhii Iliushyk --- 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 diff --git a/.mailmap b/.mailmap index 3f3f0442e5..ee567cf16e 100644 --- a/.mailmap +++ b/.mailmap @@ -1321,6 +1321,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 c71ca2a28e..3e6bf0f8ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -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 +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..b150fe1481 --- /dev/null +++ b/doc/guides/nics/ntnic.rst @@ -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. diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst index cd4219efd2..058609b0f3 100644 --- a/doc/guides/rel_notes/release_24_07.rst +++ b/doc/guides/rel_notes/release_24_07.rst @@ -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 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..368fffa81b --- /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.43.0