From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=/PurIFx8hfqa1QIw/twjCYAayWJa6MMusGOGTFVyLuQ=; b=jifEa3FQLz20tpQGjVZesWKI6HaFCAFy0IULIIOCiK5/ui+jmbaWpv1L+DvasW/MXA yktk2dSO5NyXFloixV6+m0yvV/D6mvcYb2hbYQ2uXG0h0wENYT1Ep6GSbvlFboz6dT8T mKvvXzPuenXTlosCglUq6KxCmCisv78A/ndgejZ0L4GZnQghtDNMz90GDBJJnuedu6Vf cByAtK3woP4XYLhfnrrZwgXAyDg7ZND9qd+S11JP3qy3UMlF9Xh6t5IDe+JbtgdKLVwP mqI02v9Cq+VOP2zt/jRxyrikRVN0nESm6P1cc8SJ9WwAhOIiT0zChz+UEAcxGEWhug1Y Wn0w== X-Gm-Message-State: ALoCoQnrzGtv+H47U8l9Wej6t8jjSHD0W/fNDHq+PGkypbvxXPkS57jOqoCjmN3YNZq75w8SS6xC X-Received: by 10.180.37.133 with SMTP id y5mr19003161wij.15.1442179181064; Sun, 13 Sep 2015 14:19:41 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id xs1sm12036023wjc.7.2015.09.13.14.19.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Sep 2015 14:19:40 -0700 (PDT) From: Thomas Monjalon To: Marc Sune Date: Sun, 13 Sep 2015 23:18:33 +0200 Message-ID: <2046894.c3eJ0QZGuc@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <20150909131037.GA25122@autoinstall.dev.6wind.com> <2699193.9riTyGPe1z@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Cc: dev@dpdk.org, Morten =?ISO-8859-1?Q?Br=F8rup?= Subject: Re: [dpdk-dev] [PATCH v4 0/2] ethdev: add port speed capability bitmap 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: Sun, 13 Sep 2015 21:19:41 -0000 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?