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 1B75645B90; Mon, 21 Oct 2024 10:54:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B13E64026B; Mon, 21 Oct 2024 10:54:32 +0200 (CEST) Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) by mails.dpdk.org (Postfix) with ESMTP id 8B3594021F for ; Mon, 21 Oct 2024 10:54:31 +0200 (CEST) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 39B9813804F2; Mon, 21 Oct 2024 04:54:31 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 21 Oct 2024 04:54:31 -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=fm3; t=1729500871; x=1729587271; bh=SkpQ0tx/TRVGVMlZPTGfY3DVC1wmftMZmAoVNjnF3OU=; b= W8wL38RgWDwmhmjb/vZ1bQo1GaTdBrSCztFUgI1aSTXUzLDV88nvGtbmMuQ/DeBM jH3q2HDhO/BkY0uaf8mlIlmiG4rQOaNS9Qno7Puk/J3mEt4oCNdIiE/qYlOw8xqN chyymjMTN0wAKGhLI2Uk+TnDZTshFnPG+ELdN9aGugFen+4zMS9NI7ps11TUVgIg INcH34crQnYBgcupEH4gz2W3p7P4fItbAFSO1h2YObyoZfHQOlNurQ5iueJx/4kc VhpFQseSl6M8TzRXev0VPOF9PWwi3lqBASZ6S1l0uXrNQilyva9YlCxoSVa+bbOW B+RtdyaA8ld6GZjv5vocKw== 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=fm3; t=1729500871; x= 1729587271; bh=SkpQ0tx/TRVGVMlZPTGfY3DVC1wmftMZmAoVNjnF3OU=; b=P 2n2uRkt35aJIciS1i2+R9BXKUZe9xJMJ7vB10/a9BwkuPcBmWPZU4ZoX/Iz1X66N 8iUfMggGm2Vi5Gaoq0WolPVjsoEJSRCTersmhk6nRRDM2SESt8AGIdZb9Uq2APhy bHokGiTdiPaSuB9sssyn73pSfLG1iUxcJPJ9c5Su+a0fCN8hK/HkeS4KcUXV50kt 8gpWp4WQ0sI8Pglw0eE7nOVHri+3ZsIekblzEUUYtY2HXO7k8PbGv1BU8IadHaTE EAmOPPMNJ3K6RPsKVtfuozpQ4fCSgxPD2olBnchPWz6Ndou3MMt54DDVWRW1u5m8 9oYx3JUMVD97ffM0Ml6Og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehledgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeen ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdtgeek ueevjeffjeegtdeggeekgfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtpdhn sggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeifrghngh drjhhunhhlohhnghduseiithgvrdgtohhmrdgtnhdprhgtphhtthhopeguvghvseguphgu khdrohhrghdprhgtphhtthhopehsthgvphhhvghnsehnvghtfihorhhkphhluhhmsggvrh drohhrghdprhgtphhtthhopehfvghrrhhuhhdrhihighhithesrghmugdrtghomhdprhgt phhtthhopeifrghnghdrhihonhhgudelseiithgvrdgtohhmrdgtnh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Oct 2024 04:54:29 -0400 (EDT) From: Thomas Monjalon To: Junlong Wang Cc: dev@dpdk.org, stephen@networkplumber.org, ferruh.yigit@amd.com, wang.yong19@zte.com.cn Subject: Re: [PATCH v6 8/9] net/zxdh: add zxdh dev infos get ops Date: Mon, 21 Oct 2024 10:54:27 +0200 Message-ID: <4873244.1oUyQt6lIG@thomas> In-Reply-To: <20241016081824.1808433-7-wang.junlong1@zte.com.cn> References: <20241016081647.1808333-2-wang.junlong1@zte.com.cn> <20241016081824.1808433-1-wang.junlong1@zte.com.cn> <20241016081824.1808433-7-wang.junlong1@zte.com.cn> 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 16/10/2024 10:18, Junlong Wang: > +static uint32_t zxdh_dev_speed_capa_get(uint32_t speed) > +{ > + switch (speed) { > + case RTE_ETH_SPEED_NUM_10G: return RTE_ETH_LINK_SPEED_10G; > + case RTE_ETH_SPEED_NUM_20G: return RTE_ETH_LINK_SPEED_20G; > + case RTE_ETH_SPEED_NUM_25G: return RTE_ETH_LINK_SPEED_25G; > + case RTE_ETH_SPEED_NUM_40G: return RTE_ETH_LINK_SPEED_40G; > + case RTE_ETH_SPEED_NUM_50G: return RTE_ETH_LINK_SPEED_50G; > + case RTE_ETH_SPEED_NUM_56G: return RTE_ETH_LINK_SPEED_56G; > + case RTE_ETH_SPEED_NUM_100G: return RTE_ETH_LINK_SPEED_100G; > + case RTE_ETH_SPEED_NUM_200G: return RTE_ETH_LINK_SPEED_200G; > + default: return 0; > + } > +} You could use rte_eth_speed_bitflag() instead.