From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by dpdk.org (Postfix) with ESMTP id 7E2AE1DFD5 for ; Mon, 11 Jun 2018 18:15:21 +0200 (CEST) Received: by mail-it0-f67.google.com with SMTP id v83-v6so11610487itc.3 for ; Mon, 11 Jun 2018 09:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m2TTYXx1y1VEH/8go7Oyz48JlrajiL0zutaz6diy1Q4=; b=S8WLvcVvMnxACFgVCBz1/07TARes9QSby/gbPZc5qiIRPi9RGmqHEv7PmE4rtSQTxT /1i+N3G7D46kglQWOZwB3CL+YYIY1Ap++iNXg8yBGYBpzRzzYmJLSiO4KC9YGezUnLpi Ca92os12Yo88Ov0XLO618S9OSxSOeYOlD2xtZ94HlWSBSOjI9PUY5wGdQ1EFO+symXkl DgItigO1jxFL7BK6sfLQshzdJGN+ePp2ofD4qVG7ymiCn12uaF0hv8dg5at/o2zHaExQ iWkaUCQ/Ix1Kj5szpsKTBjB/PJmt4D6OCqmTqRJ+c3ruqs7ziRJK3RFDs4vFZChWxtbX IY6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m2TTYXx1y1VEH/8go7Oyz48JlrajiL0zutaz6diy1Q4=; b=q53UVykXMej9MIiso7Oqo/N1neWaxb++9FmYbjPe/kGMEEhLd6oRANvUzDculPSh79 DVR96Si/mIRmCeBDwvuIvc1chap7R9UT8xi0ElpvagdvhmDdUzpkzlOD86CH2JKCXngG jMzSpHgde1k8WxCCduxB+2sy/veHG4NpF4i8bLraA0co0HHzAmnrKh3YFIzGECf2Qlec OW4gNPCCX6F9bP4bcKkiCAEdnbbOtKu6Nue4fo68dGi5H9Pyysv+H7IVb94VZe24BktH wZZomQPHV/f9sbxN3ur9i6jk+S3W1Se1lHUnFat62jggFBAxMDMTS5nztjQtL0I1vV4X OCzg== X-Gm-Message-State: APt69E2vHp4AgPzmTCKNm7h+SL/exiOzW08BDc7R6iZRmuk4l1q7MLc7 zkiPvcOP56gTkNs6Smx9IX6eQqp8dHRq2LDFDrQ= X-Google-Smtp-Source: ADUXVKKnbzxgy6PZpZOLzmetGbX9feERvZtxR/5dYNanLWznLA2ZyDgUZmKIOwEWD8luwLr2z0O3a8AEldxP07TdBoY= X-Received: by 2002:a24:3a49:: with SMTP id m70-v6mr2101572itm.84.1528733720897; Mon, 11 Jun 2018 09:15:20 -0700 (PDT) MIME-Version: 1.0 References: <20180607094322.14312-1-mk@semihalf.com> <20180607094322.14312-27-mk@semihalf.com> In-Reply-To: From: Chas Williams <3chas3@gmail.com> Date: Mon, 11 Jun 2018 12:15:09 -0400 Message-ID: To: mk@semihalf.com Cc: Ferruh Yigit , mw@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, dev@dpdk.org, matua@amazon.com, rk@semihalf.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 27/27] net/ena: set link speed as none X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 16:15:21 -0000 On Mon, Jun 11, 2018 at 4:01 AM Micha=C5=82 Krawczyk wrot= e: > 2018-06-10 3:35 GMT+02:00 Chas Williams <3chas3@gmail.com>: > > > > > > On Fri, Jun 8, 2018 at 3:37 PM Ferruh Yigit > wrote: > >> > >> On 6/7/2018 10:43 AM, Michal Krawczyk wrote: > >> > From: Rafal Kozik > >> > > >> > Link speed should is not limited to 10Gb/s and it shouldn't be > >> > hardcoded. > >> > > >> > They link speed is set to none instead and the applications shouldn'= t > >> > rely on this value when using ENA PMD. > >> > >> Why not able to set link speed? > >> > >> And what is the link_autoneg, ETH_LINK_FIXED? What is the point of > setting > >> link > >> speed FIXED and later speed value NONE? > > > > > > The link speed is part of the spanning tree path computation. I don't > think > > picking 0 (or undefined) > > is the appropriate choice. For virtual interfaces link speed is a > > troublesome quantity but advertising > > undefined seems worse then just use some constant value. > > > > Setting constant value is not making much sense in the virtualized > environment (ENA can be only used in the cloud). Link speed can be > very flexible in that case and that's why ENA isn't providing it. If > we will use constant value, what it should be? It may lead to > confusion or can result in the performance issues because some > applications are relying on this number to send max traffic. > What applications are using this value to determine the transmit speed? > Applications should not make assumption that the link speed is always > giving valid value and if it is not, they should try to configure rate > dynamically, instead of statically. So advertising a fixed speed of 10G should be perfectly fine. The application should not assume 10G is a valid value and will attempt to dynamically configure the rate. The link speed should never be used to determine a transmit rate for an application because you don't know the speeds in the middle of the network. > > >> > >> > >> > > >> > Fixes: 1173fca ("ena: add polling-mode driver") > >> > >> For next time can you please use git alias to have consistent Fixes > format > >> > >> > > >> > Signed-off-by: Rafal Kozik > >> > Acked-by: Michal Krawczyk > >> > --- > >> > drivers/net/ena/ena_ethdev.c | 2 +- > >> > 1 file changed, 1 insertion(+), 1 deletion(-) > >> > > >> > diff --git a/drivers/net/ena/ena_ethdev.c > b/drivers/net/ena/ena_ethdev.c > >> > index 5c3b6494f..9ae73e331 100644 > >> > --- a/drivers/net/ena/ena_ethdev.c > >> > +++ b/drivers/net/ena/ena_ethdev.c > >> > @@ -848,7 +848,7 @@ static int ena_link_update(struct rte_eth_dev > *dev, > >> > adapter =3D (struct ena_adapter *)(dev->data->dev_private); > >> > > >> > link->link_status =3D adapter->link_status ? ETH_LINK_UP : > >> > ETH_LINK_DOWN; > >> > - link->link_speed =3D ETH_SPEED_NUM_10G; > >> > + link->link_speed =3D ETH_SPEED_NUM_NONE; > >> > link->link_duplex =3D ETH_LINK_FULL_DUPLEX; > >> > > >> > return 0; > >> > > >> > > >