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: Tue, 15 Sep 2015 09:05:25 +0200 Message-ID: <5061522.mAytVLfEX7@xps13> References: <20150909131037.GA25122@autoinstall.dev.6wind.com> <98CBD80474FA8B44BF855DF32C47DC358AF3B7@smartserver.smartshare.dk> 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-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 8C9068E9A for ; Tue, 15 Sep 2015 09:06:33 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so13460458wic.1 for ; Tue, 15 Sep 2015 00:06:33 -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-14 23:33, Marc Sune: > 2015-09-14 12:52 GMT+02:00 Morten Br=F8rup = : > > This support function will be able to determine which speed is high= er when > > exotic speeds are added to the bitmap. Please extend this conversio= n > > function to give three output parameters: speed, full/half duplex, = auto > > negotiation/non-auto negotiation, or add two separate functions to = get the > > duplex and auto-negotiation. >=20 > Since, Full/Half duplex is for legacy 10/100Mbps only (afaik), I have= my > doubts on using a bit for all speeds. I would suggest to define (unro= ll) > 100M (or 100M_FD) and 100M_HD, and the same 10Mbps/1gbps, as Thomas w= as > suggesting some mails ago. >=20 > This was done in v4 (implicitely 100M =3D=3D 100M_FD). See below. Are we going to use DPDK for such low speeds? Maybe we can remove half duplex modes? [...] > So, as of v4 of this patch, there could be: a) autoneg any supported = speed > (=3D> bitmap =3D=3D 0) b) autoneg over group of speeds (=3D> more tha= n one bit set > in the bitmap) c) forced speed (one and only one set in the bitmap). +1 [...] > * encode the link speed and duplex as of now, separating duplex and n= umeric > speed. I would suggest to add the encoded speed+duplex bitmap flag fo= r > consistency (although redundant). > * or you return a single value, the bitmap with a single flag set of = the > unrolled speeds, and then have the helpers int rte_eth_speed_from_bm(= int > val_bm) and bool rte_eth_duplex_from_bm(int val_bm). Who has already used half duplex mode with DPDK?