From patchwork Tue Mar 12 07:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dengdui Huang X-Patchwork-Id: 764 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7116243C8E; Tue, 12 Mar 2024 08:52:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 591E040C35; Tue, 12 Mar 2024 08:52:42 +0100 (CET) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id C6A5C406FF for ; Tue, 12 Mar 2024 08:52:40 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Tv5Sr1ZRXz1vwY4; Tue, 12 Mar 2024 15:51:56 +0800 (CST) Received: from dggpeml500011.china.huawei.com (unknown [7.185.36.84]) by mail.maildlp.com (Postfix) with ESMTPS id F14FC140485; Tue, 12 Mar 2024 15:52:38 +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; Tue, 12 Mar 2024 15:52:38 +0800 From: Dengdui Huang To: CC: , , , , , , , , Subject: [PATCH 0/3] support setting lanes Date: Tue, 12 Mar 2024 15:52:35 +0800 Message-ID: <20240312075238.3319480-1-huangdengdui@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 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 Some speeds can be achieved with different number of lanes. For example, 100Gbps can be achieved using two lanes of 50Gbps or four lanes of 25Gbps. When use different lanes, the port cannot be up. This patch set add support setting lanes for ethdev In addition, modify the testpmd and hns3 driver to adapt to it. Dengdui Huang (3): ethdev: support setting lanes net/hns3: support setting lanes app/testpmd: support setting lanes app/test-pmd/cmdline.c | 110 ++++---- app/test-pmd/config.c | 60 +++-- doc/guides/rel_notes/release_24_03.rst | 11 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 3 +- drivers/net/bnxt/bnxt_ethdev.c | 3 +- drivers/net/hns3/hns3_cmd.h | 15 +- drivers/net/hns3/hns3_common.c | 3 +- drivers/net/hns3/hns3_ethdev.c | 112 ++++---- drivers/net/hns3/hns3_ethdev.h | 2 + lib/ethdev/ethdev_driver.h | 1 - lib/ethdev/ethdev_linux_ethtool.c | 101 +++++++- lib/ethdev/ethdev_private.h | 4 + lib/ethdev/ethdev_trace.h | 4 +- lib/ethdev/meson.build | 2 + lib/ethdev/rte_ethdev.c | 272 +++++++++++++++++++- lib/ethdev/rte_ethdev.h | 99 +++++-- lib/ethdev/version.map | 7 + 17 files changed, 635 insertions(+), 174 deletions(-)