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 E1F87A0C45; Mon, 13 Sep 2021 10:45:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC7AB40151; Mon, 13 Sep 2021 10:45:47 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 309F74014F for ; Mon, 13 Sep 2021 10:45:46 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4H7KmF6J1Wz1DGFf; Mon, 13 Sep 2021 16:44:45 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Mon, 13 Sep 2021 16:45:43 +0800 To: "dev@dpdk.org" CC: Ferruh Yigit , Thomas Monjalon , Declan Doherty , Keith Wiles From: "Min Hu (Connor)" Message-ID: <29b75903-d212-c6e6-eedf-e3bc92ab816a@huawei.com> Date: Mon, 13 Sep 2021 16:45:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] Questions about rte_eth_link_speed_to_str API 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 Sender: "dev" Hi all, I have questions about rte_eth_link_speed_to_str API. The API converts link speed to string for display, But it only supports the following speeds, like that: case ETH_SPEED_NUM_NONE: return "None"; case ETH_SPEED_NUM_10M: return "10 Mbps"; case ETH_SPEED_NUM_100M: return "100 Mbps"; case ETH_SPEED_NUM_1G: return "1 Gbps"; case ETH_SPEED_NUM_2_5G: return "2.5 Gbps"; case ETH_SPEED_NUM_5G: return "5 Gbps"; case ETH_SPEED_NUM_10G: return "10 Gbps"; case ETH_SPEED_NUM_20G: return "20 Gbps"; case ETH_SPEED_NUM_25G: return "25 Gbps"; case ETH_SPEED_NUM_40G: return "40 Gbps"; case ETH_SPEED_NUM_50G: return "50 Gbps"; case ETH_SPEED_NUM_56G: return "56 Gbps"; case ETH_SPEED_NUM_100G: return "100 Gbps"; case ETH_SPEED_NUM_200G: return "200 Gbps"; case ETH_SPEED_NUM_UNKNOWN: return "Unknown"; default: return "Invalid"; In some cases, like bonding, for example, three slaves which link speed are 10Gbps, so link speed of bonding port will be 30Gbps, but it shows "Invalid". Is this reasonable£¿ any comments will be welcome. Best wishes