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 1AA5843D1E; Fri, 22 Mar 2024 08:09:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 878B342E5B; Fri, 22 Mar 2024 08:09:28 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 6509242DF1 for ; Fri, 22 Mar 2024 08:09:26 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4V1D092pQsz2BgZN; Fri, 22 Mar 2024 15:06:49 +0800 (CST) Received: from dggpeml500011.china.huawei.com (unknown [7.185.36.84]) by mail.maildlp.com (Postfix) with ESMTPS id 6E6921A0172; Fri, 22 Mar 2024 15:09:24 +0800 (CST) Received: from localhost.huawei.com (10.50.165.33) by dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 15:09:24 +0800 From: Dengdui Huang To: CC: , , , , , , , , , , , , Subject: [PATCH v2 0/6] support setting lanes Date: Fri, 22 Mar 2024 15:09:17 +0800 Message-ID: <20240322070923.244417-1-huangdengdui@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240312075238.3319480-4-huangdengdui@huawei.com> References: <20240312075238.3319480-4-huangdengdui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500011.china.huawei.com (7.185.36.84) 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 At the physical layer, multiple lanes are often used to work together to achieve higher speeds. So a speeds can be achieved with different number of lanes. For example, the following solutions can be used to implement 100G: 1. Combines four 25G lanes 2. Combines two 50G lanes 3. A single 100G lane It is assumed that two ports are interconnected and the two ports support the above three solutions. But, we just configured the speed to 100G and one port uses four 25G lanes by default and the other port uses two 50G lanes by default, the port cannot be up. In this case, we need to configure the ports to use the same solutions (for example, uses two 50G lanes) so that the ports can be up. This patch set add support setting lanes for ethdev. application can use this feature to configure lanes to help select the same solutions. In addition, modify the testpmd and hns3 driver to adapt to it. change log: v1->v2: - ethdev updata parse link mode info function name - hns3 driver modify report FEC capability - testpmd add a command to config speed with lanes - update UT and some code rectification Dengdui Huang (6): ethdev: support setting lanes test: updated UT for setting lanes ethdev: add function to parse link mode info net/hns3: use parse link mode info function net/hns3: support setting lanes app/testpmd: support setting lanes app/test-pmd/cmdline.c | 199 +++++++++----- app/test-pmd/config.c | 78 ++++-- app/test/test_ethdev_link.c | 18 +- doc/guides/rel_notes/release_24_03.rst | 11 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 + drivers/net/bnxt/bnxt_ethdev.c | 3 +- drivers/net/hns3/hns3_cmd.h | 15 +- drivers/net/hns3/hns3_common.c | 2 + drivers/net/hns3/hns3_ethdev.c | 206 ++++++++------ drivers/net/hns3/hns3_ethdev.h | 2 + lib/ethdev/ethdev_linux_ethtool.c | 208 +++++++------- lib/ethdev/ethdev_private.h | 4 + lib/ethdev/ethdev_trace.h | 4 +- lib/ethdev/meson.build | 2 + lib/ethdev/rte_ethdev.c | 284 ++++++++++++++++++-- lib/ethdev/rte_ethdev.h | 104 +++++-- lib/ethdev/version.map | 7 + 17 files changed, 829 insertions(+), 327 deletions(-) -- 2.33.0