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 EB79B4560F; Fri, 12 Jul 2024 11:49:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B706D42F05; Fri, 12 Jul 2024 11:48:54 +0200 (CEST) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id 5603542EA3 for ; Fri, 12 Jul 2024 11:48:47 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02lp2104.outbound.protection.outlook.com [104.47.11.104]) by mx-outbound8-179.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 12 Jul 2024 09:48:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o5rEdgs1oBbieAAZHnLOjbiCSpNa1vd31CTZSw516guZlyl+YAEywePjYUd3cCWofBDA2c1bxTNr7K96L1PuPwMmWH9yG8uxw6s/C8Z1kBadAuz2fwTNl0Mg2swSx1I2Vw+sFpNwRzqqa9qKBvtUA/wr7vd7VuDiNMmJfa0c8FEE9NoWkewLt/jNrYaUjcveJfwuxonmKJoihFUQE0tZx3HTi3KVetwvMaahuEM+/t7jITF/6RkRnrH65FFKz5h5oJHx+lZZtc2oDoCgEbBc1y43nDx0RxMwcNLklbCLB7xjbjnLc5+WGPFhMrpzgcjn1Tt2ZYS0cNQppTeULysyHg== 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=Yr0Rjij0xbfZOKFtIIzWHWUXs2ciifeRaObmD2ctSbo=; b=YlmpgigFnoV63eFuLXe7/E4I/DuzsmfrJvWOUwRha7wW20cPqqRti4Ch2DQUzIsUfft6SI6RdvD/7ytGr38BJmpW9Zg/DbGveujE1hMFKNAnpV2fM1d5W3J6OOR8ZcP6zXvU8qh08BdptYKEGna1P6bs2JphDIZ8Jcy9Nj/PC4XVvDgsKMVAdcwP80Hbt4prhaam5pDikC9fzzVwAD2s7ufiwkqF5FNsgs/xuBU7t2UZfxgdaLT6q6nJY6bjPuRWFuhk6z3BiUpHom1g8SPJfMXVsBzb/jRrZuaFnnsql1VfKd6uop93gPUr0RCCEp6z3msocBNmgvMfrRlDmju+Tg== 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=Yr0Rjij0xbfZOKFtIIzWHWUXs2ciifeRaObmD2ctSbo=; b=Oj5N5L2e62CFTH3Aif0kVONRsQtc6c0W6MNmTFja/x3pQWhyg1VdK7e2dopG+5BIRymGj5P9ox/LhCUxEMyzel782tGhEiB1Wb4cI3pQ3NlylfvxK3YJuMmW/Pnb3c3lPET8fxAlcql2KzP3zgHkKkGCAxfsNgbDKynCwjdYeDI= Received: from AS9PR06CA0531.eurprd06.prod.outlook.com (2603:10a6:20b:49d::26) by GVXP190MB2013.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:48:35 +0000 Received: from AM1PEPF000252DD.eurprd07.prod.outlook.com (2603:10a6:20b:49d:cafe::f1) by AS9PR06CA0531.outlook.office365.com (2603:10a6:20b:49d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 09:48:35 +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 AM1PEPF000252DD.mail.protection.outlook.com (10.167.16.55) with Microsoft SMTP Server id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 09:48:34 +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 v7 01/21] net/ntnic: add ethdev and makes PMD available Date: Fri, 12 Jul 2024 11:48:06 +0200 Message-ID: <20240712094831.861260-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: AM1PEPF000252DD:EE_|GVXP190MB2013:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 525d47a4-2fe1-46c4-b8ef-08dca257cbe5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-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ZTvl61WxoKFpuNA49ObEaNHyNtAaJE?= =?us-ascii?Q?YLzBDuwCEcJCHzKhBGeAEBD+ZZXFgIqHFpJigSy7jcVnfQhbX4Sc/Ug0wllU?= =?us-ascii?Q?w6qvNGi6YSjofVFAODJXows2bxfmRFqH+7JXGRUYnMWq18m9ZIrQtpdYnfaT?= =?us-ascii?Q?AfBf/zTXnlG+9j4z965nHs5w79GkirFjlSroL74DAY1ISD3G51vSJDjTojCN?= =?us-ascii?Q?dYyfqDgRVBDcfeWcvcbLeK39KOK+y6zZLMkuM2KfLm1oesnSt4QyR25WpFn7?= =?us-ascii?Q?UYVmOaodJz9bcaXgFgapSX3ZoQvLkJMAdsA7+ofG9cgTvcBRGpFWXwI2dMtz?= =?us-ascii?Q?MVoBI0ugAg5C13MIVAF36ErgxKGdTkBXJM6oNNHYag+5IeNlcmQdGE1XX24+?= =?us-ascii?Q?tvITpR1sc+djK6iz96+EJQgBwxqmAoU31vv5+jrjnlJCP5nlfjuX2GTzod83?= =?us-ascii?Q?GsUYIeQ4mwsCdOTTV3DtDuYql8bdPanv6LaJ76VHJ1HZ4Xea+9sGuqG1pHfb?= =?us-ascii?Q?v2P6UsWBeomwX1N+0LStIbMphUST?= 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)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7c3gezxev/J+lVsq8CzoCdfJL9U5EaqZF/9zZiP7804oE2MRkZM/Fp7Z0D24lAraNoyza2b8vtiGrpjfNXrO1rqVEpEJjQaupipc0bvpMZgW6if2vWdfldMECOeoCsl0gDjkN83om9Fwd3eJB2IZW11cnGo5OAHo/15fWQPAhTuM3W3U59cdUCgdBPjkuZIoClun9Pq1rhnkBcnqrf2Pp2H73LmTofUgCmiCS6BIYFPjX88wbbEMc6VkBvPAXUzR45/Y9JzTFai22/3TFY0Q6OOC3JRsNfAS4UOE3Av4Umw8rFmn+10CRGNya4ElN7RnXh6VxO8NT8knU8ngRmZhQN4ODkIwguAokDDpl70mA2dx2z9+kNNM3xS1I7ZBHCGqBFpy8r49y3M8dwA/WD0T/VFUO7EjSWNdCH6ZnwRBc5Fpc2wLCr27hBgIm6XBCWDkPv6Pfp5ku+H04i+anNvOHO9FAE8cvkeQ7LZcaxCwGoiRHNA1gMiRTCxnccqiHZGeDCPocie6QO4BXzJWojjd9yb2skfbcktIBDOprUrSW3ItpTZxQbD3Z3NugFDge8XDtWIAemFc91FbKVA4eG78dgX/Z37IR5MYb3+yP6cr1+JdHpyGoeXSfmu0YQZdHIP1TR2P2mAjTloFPzuQaZFElA== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:48:34.4577 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 525d47a4-2fe1-46c4-b8ef-08dca257cbe5 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: AM1PEPF000252DD.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXP190MB2013 X-BESS-ID: 1720777719-302227-12701-8264-2 X-BESS-VER: 2019.1_20240702.1505 X-BESS-Apparent-Source-IP: 104.47.11.104 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVmbmZoZAVgZQ0MzSyMTEzNzE2N zYzMTQzNgoxdQg0SLR3NTS0NI42dJQqTYWANT7kAFBAAAA X-BESS-Outbound-Spam-Score: 0.51 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.257571 [from cloudscan23-119.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.01 BSF_SC7_SG0146_1 META: Custom rule SG0146_1 X-BESS-Outbound-Spam-Status: SCORE=0.51 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND, BSF_SC7_SG0146_1 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 --- .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. +* **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