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 EB21F424E7; Mon, 4 Sep 2023 06:57:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1689402C5; Mon, 4 Sep 2023 06:57:22 +0200 (CEST) Received: from VLXDG1SPAM1.ramaxel.com (email.ramaxel.com [221.4.138.186]) by mails.dpdk.org (Postfix) with ESMTP id 2C860402C5 for ; Mon, 4 Sep 2023 06:57:20 +0200 (CEST) Received: from V12DG1MBS03.ramaxel.local ([172.26.18.33]) by VLXDG1SPAM1.ramaxel.com with ESMTP id 3844v8w3054227; Mon, 4 Sep 2023 12:57:08 +0800 (GMT-8) (envelope-from wanry@3snic.com) Received: from localhost.localdomain (10.64.136.151) by V12DG1MBS03.ramaxel.local (172.26.18.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.17; Mon, 4 Sep 2023 12:57:07 +0800 From: To: CC: , Renyong Wan , Steven Song Subject: [PATCH v5 01/32] net/sssnic: add build and doc infrastructure Date: Mon, 4 Sep 2023 12:56:27 +0800 Message-ID: <20230904045658.238185-2-wanry@3snic.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230904045658.238185-1-wanry@3snic.com> References: <20230904045658.238185-1-wanry@3snic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Originating-IP: [10.64.136.151] X-ClientProxiedBy: V12DG1MBS03.ramaxel.local (172.26.18.33) To V12DG1MBS03.ramaxel.local (172.26.18.33) X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: VLXDG1SPAM1.ramaxel.com 3844v8w3054227 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 From: Renyong Wan Adding minimum PMD code, doc and build infrastructure for sssnic. Signed-off-by: Steven Song Signed-off-by: Renyong Wan --- v2: * Fixed 'Title underline too short' in doc/guides/nics/sssnic.rst. * Removed error.h from including files. v5: * Fixed rebase mistake. * Fixed incorrect path in MAINTAINERS file. --- .mailmap | 2 + MAINTAINERS | 7 +++ doc/guides/nics/features/sssnic.ini | 9 ++++ doc/guides/nics/index.rst | 1 + doc/guides/nics/sssnic.rst | 73 +++++++++++++++++++++++++++++ drivers/net/meson.build | 1 + drivers/net/sssnic/meson.build | 18 +++++++ drivers/net/sssnic/sssnic_ethdev.c | 28 +++++++++++ 8 files changed, 139 insertions(+) create mode 100644 doc/guides/nics/features/sssnic.ini create mode 100644 doc/guides/nics/sssnic.rst create mode 100644 drivers/net/sssnic/meson.build create mode 100644 drivers/net/sssnic/sssnic_ethdev.c diff --git a/.mailmap b/.mailmap index 864d33ee46..8b66f866d0 100644 --- a/.mailmap +++ b/.mailmap @@ -1156,6 +1156,7 @@ Rebecca Troy Remi Pommarel Remy Horton Renata Saiakhova +Renyong Wan Reshma Pattan Ricardo Roldan Ricardo Salveti @@ -1329,6 +1330,7 @@ Stephen Hurd Steve Capper Steven Lariau Steven Luong +Steven Song Steven Webster Steven Zou Steve Rempe diff --git a/MAINTAINERS b/MAINTAINERS index a926155f26..1e161c3305 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -633,6 +633,13 @@ F: drivers/net/af_xdp/ F: doc/guides/nics/af_xdp.rst F: doc/guides/nics/features/af_xdp.ini +3SNIC sssnic +M: Renyong Wan +M: Steven Song +F: drivers/net/sssnic/ +F: doc/guides/nics/sssnic.rst +F: doc/guides/nics/features/sssnic.ini + Amazon ENA M: Michal Krawczyk M: Shai Brandes diff --git a/doc/guides/nics/features/sssnic.ini b/doc/guides/nics/features/sssnic.ini new file mode 100644 index 0000000000..6d9786db7e --- /dev/null +++ b/doc/guides/nics/features/sssnic.ini @@ -0,0 +1,9 @@ +; +; Supported features of the 'sssnic' network poll mode driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Linux = Y +ARMv8 = Y +x86-64 = Y diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index 7bfcac880f..9d2b29383b 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -61,6 +61,7 @@ Network Interface Controller Drivers qede sfc_efx softnic + sssnic tap thunderx txgbe diff --git a/doc/guides/nics/sssnic.rst b/doc/guides/nics/sssnic.rst new file mode 100644 index 0000000000..fe0180c2e6 --- /dev/null +++ b/doc/guides/nics/sssnic.rst @@ -0,0 +1,73 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2022 Shenzhen 3SNIC Information Technology Co., Ltd. + +SSSNIC Poll Mode Driver +======================= + +The sssnic PMD (**librte_pmd_sssnic**) provides poll mode driver support +for 3SNIC 9x0 serials family of Ethernet adapters. + + +Supported NICs +-------------- + +- 3S910 Dual Port SFP28 10/25GbE Ethernet adapter +- 3S920 Quad Port SFP28 10/25GbE Ethernet adapter +- 3S920 Quad Port QSFP28 100GbE Ethernet adapter + + +Features +-------- + +Features of sssnic PMD are: + +- Link status +- Link status event +- Queue start/stop +- Rx interrupt +- Scattered Rx +- TSO +- LRO +- Promiscuous mode +- Allmulticast mode +- Unicast MAC filter +- Multicast MAC filte +- RSS hash +- RSS key update +- RSS reta update +- Inner RSS +- VLAN filter +- VLAN offload +- L3 checksum offload +- L4 checksum offload +- Inner L3 checksum +- Inner L4 checksum +- Basic stats +- Extended stats +- Stats per queue +- Flow control +- FW version +- Generic flow API + + +Prerequisites +------------- + +- Learning about 3SNIC Ethernet NICs using + ``_. + +- Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. + + +Driver compilation and testing +------------------------------ + +Refer to the document :ref:`compiling and testing a PMD for a NIC ` +for details. + + +Limitations or Known issues +--------------------------- + +Build with ICC is not supported yet. +Power8, ARMv7 and BSD are not supported yet. diff --git a/drivers/net/meson.build b/drivers/net/meson.build index bd38b533c5..224eab99a7 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -54,6 +54,7 @@ drivers = [ 'ring', 'sfc', 'softnic', + 'sssnic', 'tap', 'thunderx', 'txgbe', diff --git a/drivers/net/sssnic/meson.build b/drivers/net/sssnic/meson.build new file mode 100644 index 0000000000..fda65aa380 --- /dev/null +++ b/drivers/net/sssnic/meson.build @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018-2022 Shenzhen 3SNIC Information Technology Co., Ltd. + +if not is_linux + build = false + reason = 'only supported on Linux' + subdir_done() +endif + +if (arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64')) + build = false + reason = 'only supported on x86_64 and aarch64' + subdir_done() +endif + +sources = files( + 'sssnic_ethdev.c', +) diff --git a/drivers/net/sssnic/sssnic_ethdev.c b/drivers/net/sssnic/sssnic_ethdev.c new file mode 100644 index 0000000000..dcda01eeb8 --- /dev/null +++ b/drivers/net/sssnic/sssnic_ethdev.c @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018-2022 Shenzhen 3SNIC Information Technology Co., Ltd. + */ + +#include +#include + +static int +sssnic_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) +{ + RTE_SET_USED(pci_drv); + RTE_SET_USED(pci_dev); + return -EINVAL; +} + +static int +sssnic_pci_remove(struct rte_pci_device *pci_dev) +{ + RTE_SET_USED(pci_dev); + return -EINVAL; +} + +static struct rte_pci_driver sssnic_pmd = { + .probe = sssnic_pci_probe, + .remove = sssnic_pci_remove, +}; + +RTE_PMD_REGISTER_PCI(net_sssnic, sssnic_pmd); -- 2.27.0