From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id 90D8A2949 for ; Thu, 3 Mar 2016 08:53:54 +0100 (CET) Received: from [10.100.1.152] (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Thu, 03 Mar 2016 08:53:45 +0100 To: Stephen Hurd , dev@dpdk.org References: <1456954614-119304-1-git-send-email-stephen.hurd@broadcom.com> <1456978137-98097-1-git-send-email-stephen.hurd@broadcom.com> <1456978137-98097-2-git-send-email-stephen.hurd@broadcom.com> From: =?UTF-8?Q?Simon_K=c3=a5gstr=c3=b6m?= Message-ID: <56D7ED89.8060903@netinsight.net> Date: Thu, 3 Mar 2016 08:53:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456978137-98097-2-git-send-email-stephen.hurd@broadcom.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/7] lib/librte_ether: Add 2/2.5/25/50Gbps link speeds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 07:53:54 -0000 Hi! On 2016-03-03 05:08, Stephen Hurd wrote: > Add additional ETH_LINK_SPEED_* macros for 2, 2.5, 25, and 50 Gbps links > > Signed-off-by: Stephen Hurd > --- > lib/librte_ether/rte_ethdev.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 16da821..cb40bbb 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -254,10 +254,14 @@ struct rte_eth_link { > #define ETH_LINK_SPEED_10 10 /**< 10 megabits/second. */ > #define ETH_LINK_SPEED_100 100 /**< 100 megabits/second. */ > #define ETH_LINK_SPEED_1000 1000 /**< 1 gigabits/second. */ > +#define ETH_LINK_SPEED_2000 2000 /**< 2 gigabits/second. */ > +#define ETH_LINK_SPEED_2500 2500 /**< 2.5 gigabits/second. */ > #define ETH_LINK_SPEED_10000 10000 /**< 10 gigabits/second. */ > #define ETH_LINK_SPEED_10G 10000 /**< alias of 10 gigabits/second. */ > #define ETH_LINK_SPEED_20G 20000 /**< 20 gigabits/second. */ > +#define ETH_LINK_SPEED_25G 25000 /**< 25 gigabits/second. */ > #define ETH_LINK_SPEED_40G 40000 /**< 40 gigabits/second. */ > +#define ETH_LINK_SPEED_50G 50000 /**< 50 gigabits/second. */ I realize this is a more general question, but is it really meaningful to have macros for all possible link speeds? We're working on a PMD driver with a channelized interface exposed as DPDK ports. Each channel can be configured with an arbitrary speed, so e.g., 1337 Mbps is also possible. To me, it would seem more natural to just have a number in mbits for the link speed. // Simon