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 5295C43D06; Fri, 22 Mar 2024 14:58:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2119E402A7; Fri, 22 Mar 2024 14:58:27 +0100 (CET) Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) by mails.dpdk.org (Postfix) with ESMTP id 4DEE340284 for ; Fri, 22 Mar 2024 14:58:26 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 90A4A114016F; Fri, 22 Mar 2024 09:58:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 22 Mar 2024 09:58:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1711115905; x=1711202305; bh=XyNZGYGaLctnjVQxDC8AbZaUgzrUfN/xA1s/UoJzPmo=; b= xl0bWR1dwOKWlLEQJGs1Vp2BVjKpUwWWgE63AagnJWP4xAa+oOOGOL0CIzoZq/J2 qT8UXSQMQo0WoyD3dCBBolZfytP7Gp9JtU1AQpUrYuIcBOgm9tXfWcgcfPmy0vcI HX+t3z9v0kPGq2/1xYqX3RVmV1yfG5xPxE0bCS117RLyrGqKRuf5H4jW3F+gACuj 6SEhoGZqr4t5UQNmcOBkd7wpU/6oBxrePr3sTdA5rdvBqKrd6O3x4F8bSNl77l/x bMn+p5OMFporbUyUiGZfc7tAPERGXM+GgdYh0mkPE8aZwoCHAIVfDop569cErcLq KvvyhUiZslieYnkyTqXiew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711115905; x= 1711202305; bh=XyNZGYGaLctnjVQxDC8AbZaUgzrUfN/xA1s/UoJzPmo=; b=c xte81AvAozcVBI8FQv7uoC6m/P4h5YZhPKoPz/UCtuqx4wQAQxeriD3TJbGdxgMg +vx9QdTwpcpFFB/y6nWMZ9otIH7WA/ouzlKryI2AnS7Y0xRMOD5tBu0poAJJOx0g j43QQUq4CQnC+vCLJSQItxhp65L9LMjy0NgAljrAoNwUx7sMDdcpeHgGCVdLVerg 4mreK03dfUsqtYJmTJTnz0KPm9mwTuy386y9dR/DBxWGr4C/YpRswf6pWbbKww5v a/9FQGjhwayBoC5aSqdIbNvVP5UphSkuEOhykCPCBtTc/XVAFbW9KVUU8hWRuhEv mUTQHkHXXj8gkPEBPyJVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddttddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdtgeekueevjeffjeegtdeggeek gfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Mar 2024 09:58:23 -0400 (EDT) From: Thomas Monjalon To: Dengdui Huang Cc: dev@dpdk.org, ferruh.yigit@amd.com, aman.deep.singh@intel.com, yuying.zhang@intel.com, andrew.rybchenko@oktetlabs.ru, damodharam.ammepalli@broadcom.com, stephen@networkplumber.org, jerinjacobk@gmail.com, ajit.khaparde@broadcom.com, liuyonglong@huawei.com, fengchengwen@huawei.com, haijie1@huawei.com, lihuisong@huawei.com Subject: Re: [PATCH v2 1/6] ethdev: support setting lanes Date: Fri, 22 Mar 2024 14:58:22 +0100 Message-ID: <4413054.MSiuQNM8U4@thomas> In-Reply-To: <20240322070923.244417-2-huangdengdui@huawei.com> References: <20240312075238.3319480-4-huangdengdui@huawei.com> <20240322070923.244417-1-huangdengdui@huawei.com> <20240322070923.244417-2-huangdengdui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 22/03/2024 08:09, Dengdui Huang: > -#define RTE_ETH_LINK_SPEED_10G RTE_BIT32(8) /**< 10 Gbps */ > -#define RTE_ETH_LINK_SPEED_20G RTE_BIT32(9) /**< 20 Gbps */ > -#define RTE_ETH_LINK_SPEED_25G RTE_BIT32(10) /**< 25 Gbps */ > -#define RTE_ETH_LINK_SPEED_40G RTE_BIT32(11) /**< 40 Gbps */ > -#define RTE_ETH_LINK_SPEED_50G RTE_BIT32(12) /**< 50 Gbps */ > -#define RTE_ETH_LINK_SPEED_56G RTE_BIT32(13) /**< 56 Gbps */ > -#define RTE_ETH_LINK_SPEED_100G RTE_BIT32(14) /**< 100 Gbps */ > -#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 Gbps */ > -#define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16) /**< 400 Gbps */ > +#define RTE_ETH_LINK_SPEED_10G RTE_BIT32(8) /**< 10 Gbps */ > +#define RTE_ETH_LINK_SPEED_20G RTE_BIT32(9) /**< 20 Gbps 2lanes */ > +#define RTE_ETH_LINK_SPEED_25G RTE_BIT32(10) /**< 25 Gbps */ > +#define RTE_ETH_LINK_SPEED_40G RTE_BIT32(11) /**< 40 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_50G RTE_BIT32(12) /**< 50 Gbps */ > +#define RTE_ETH_LINK_SPEED_56G RTE_BIT32(13) /**< 56 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_100G RTE_BIT32(14) /**< 100 Gbps */ > +#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16) /**< 400 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_10G_4LANES RTE_BIT32(17) /**< 10 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_50G_2LANES RTE_BIT32(18) /**< 50 Gbps 2 lanes */ > +#define RTE_ETH_LINK_SPEED_100G_2LANES RTE_BIT32(19) /**< 100 Gbps 2 lanes */ > +#define RTE_ETH_LINK_SPEED_100G_4LANES RTE_BIT32(20) /**< 100 Gbps 4lanes */ > +#define RTE_ETH_LINK_SPEED_200G_2LANES RTE_BIT32(21) /**< 200 Gbps 2lanes */ > +#define RTE_ETH_LINK_SPEED_400G_8LANES RTE_BIT32(22) /**< 400 Gbps 8lanes */ I don't think it is a good idea to make this more complex. It brings nothing as far as I can see, compared to having speed and lanes separated. Can we have lanes information a separate value? no need for bitmask.