From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 0/2] ethdev: add port speed capability bitmap Date: Sun, 13 Sep 2015 23:18:33 +0200 Message-ID: <2046894.c3eJ0QZGuc@xps13> References: <20150909131037.GA25122@autoinstall.dev.6wind.com> <2699193.9riTyGPe1z@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, Morten =?ISO-8859-1?Q?Br=F8rup?= To: Marc Sune Return-path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 4884C3787 for ; Sun, 13 Sep 2015 23:19:41 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so117613462wic.1 for ; Sun, 13 Sep 2015 14:19:41 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-09-13 21:14, Marc Sune: > 2015-09-09 15:33 GMT+02:00 Thomas Monjalon : > > 2015-09-09 15:10, N=E9lio Laranjeiro: > > > I think V2 is better, maybe you can add a function to convert a s= ingle > > > bitmap value to the equivalent integer and get rid of ETH_SPEED_X= XX > > macros. > > > > > > Thomas what is your opinion? > > > > Your proposal looks good Nelio. >=20 > I am confused, specially since you were the one advocating for having= a > unified set of constants for speeds (discussion in v2). Yes, my first thought was advocating an unification between capabilitie= s and negotiated link properties. After I was convinced by Nelio's arguments: bitmap is good for capabili= ties (especially to describe every capabilities in one field) but integer is= better for negotiated speed (especially for aggregated links). Converting bitmap speed into integer should be easy to implement in a f= unction. > In any case, as I see it, if we want to address the comments of M. B= rorup: >=20 > http://comments.gmane.org/gmane.comp.networking.dpdk.devel/19664 >=20 > we need bitmaps for rte_eth_conf link_speed to set the advertised spe= eds. Yes I forgot this interesting comment. It is saying we need =091/ capabilities =092/ advertised modes (for auto-negotiation or fixed config) =093/ negotiated mode Previously we were focused only on 1/ and 3/. 2/ was only limited to a mode configured without negotiation and was us= ing the same field as 3/. Maybe we should really have 3 different fields. 1/ and 2/ would use a b= itmap. > Let me know if you really want to come back to v2 or not. It needs more discussion. What do you think of the above proposal? What is the opinion of Nelio? Morten?