From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=eVppSIieV2HuqmyaQS09t1Gh5H+QZkqcw80WiI1vh0c=; b=ZCkvSEFgpBb6RGo7xzJ4W3sncapUTegQEDfvWD2f44sLaphb6DLNxzUQkIwGH87vWM YfzG2ftOcXQbH2d7TtNlMagWrvdQH5OsVUJnD7fbEI+Zn4ZJbZoyUtaORK92lX2Qtm+G GQ2kBw8IGT7Xd+Ijh70X68LJSYx2pxQVU+6g9L27+5k4aEMNXlIi81TdDgdKOeE/OW97 AhPL52S8L6qAzjWmUMlo29OCzi98FbieNgg3V6XxF0vvbHDgOr9WuAxj2GDMGa+mUBg0 0T03hSTB0j4PvQB/j+pUmMG8xgmnxUNL4cDnRa4n+buwfxB5PWXS5lUJYPIr22Y53N27 fZhg== X-Gm-Message-State: ALoCoQnEaLDcTarlyr10uwzdem45B2V8SnLnqnIX0Jo9bi+Ovm8/5ZWIggPpAUjNw9XoQudrO29m X-Received: by 10.194.84.38 with SMTP id v6mr6880380wjy.71.1442300793330; Tue, 15 Sep 2015 00:06:33 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id p8sm19361659wjr.39.2015.09.15.00.06.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Sep 2015 00:06:32 -0700 (PDT) From: Thomas Monjalon To: Marc Sune Date: Tue, 15 Sep 2015 09:05:25 +0200 Message-ID: <5061522.mAytVLfEX7@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> <98CBD80474FA8B44BF855DF32C47DC358AF3B7@smartserver.smartshare.dk> 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: Tue, 15 Sep 2015 07:06:33 -0000 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?