From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dan.gora@gmail.com>
Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com
 [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 7B60A1B17C
 for <dev@dpdk.org>; Fri, 28 Sep 2018 01:52:29 +0200 (CEST)
Received: by mail-wr1-f68.google.com with SMTP id b11-v6so4399055wru.9
 for <dev@dpdk.org>; Thu, 27 Sep 2018 16:52:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=uUc7HBTaw1+0n4zV9wYi0lemBkL0J/Bvs7tEIBbwBBg=;
 b=aPTzOSSXbWJ7ho9DaPeq7e3dMZFGt+WXa7re9U2PEY619Ehk3xIAZlU23q4CYuVVIR
 8ftogR2nMXuIhy7j3OOAhT+64Kxl9zhCOIzXiNpUPAHjA8Y2UzQdjfyZDBXh2YVeYHt9
 mGrjWFnL3GvRJLm2SHIP5/YjC5kShX9S9+8LyKpu2SvD0aQuTlAXVADtRWlzuyXl9rt5
 vDRhSJqsM+k9yyQ64armmKRLpTC1NaPCTCU1aH8/1yocw/64rJcOGMaqoaYpfW0kK/cD
 OET31QTWqc4NUFaKTX2itnVRy5nDXdAs3bx2OvHzR7j6cjDRjZQPAspDJgiSVpcBwsSb
 k16g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=uUc7HBTaw1+0n4zV9wYi0lemBkL0J/Bvs7tEIBbwBBg=;
 b=HD9ROb1VqRKPqy8zvZrokYTBssEYgE3XUsRVCDbe9ToSkcsMp6u8Ev880KBZk5SoWt
 ws/nJtN1jqI8da/gk2zaqyf87UOCPXI1CGQ8KMaRc9W+t3nkQSrJVo5Bam4ZogVz3BXl
 puhYzcjVruHd/ikIWyAGLpqQR88I3mUh8rGS1M6iq3xoPLTTedvR9GEMExEjWALuq0ce
 2MAOtVqyV+boLmYh545I+hqMAjx8o1750NkzqgMnCVddrnsCz8M+RW4Ld/pEWXDg2MXl
 M9ZdlQQg1V/08R/yF1fP0Sj9eJcaQNsazRFZZD0+N2DakF8N6zku45c6JsBUyNkSmpYo
 atUw==
X-Gm-Message-State: ABuFfohAOx4MT93+9WtNmJOU7ncPmtR0nmqv2FmlgLP6GzooXFsBkuh3
 TFa/8R3+9r7ccCrrCrwdRmcauJWy4wuvwnRedQk=
X-Google-Smtp-Source: ACcGV62/Iln5Zttdp970zUKXPcpN85SgMPBx5wK3CMc3wKQ/lpP9fLCJxLJ8pa2Cokd4gqJ5K6qFIkweBN1/2eE3zAA=
X-Received: by 2002:adf:ad29:: with SMTP id
 p38-v6mr10160352wrc.25.1538092348865; 
 Thu, 27 Sep 2018 16:52:28 -0700 (PDT)
MIME-Version: 1.0
Sender: dan.gora@gmail.com
Received: by 2002:adf:fbc1:0:0:0:0:0 with HTTP; Thu, 27 Sep 2018 16:51:48
 -0700 (PDT)
In-Reply-To: <846eed94-2ed7-7b89-5a3e-696ec3674a26@intel.com>
References: <20180911232906.18352-1-dg@adax.com>
 <20180919195549.5585-1-dg@adax.com>
 <20180919195549.5585-2-dg@adax.com>
 <671135e5-a666-4254-c5c6-672c3863146b@intel.com>
 <CAGyogRZx6THZuRreTLEBiYjZ8V_sbZk3HZywSprUU0PM5Wy7QA@mail.gmail.com>
 <e8ba3242-2aea-87bf-3dd2-c1522285620e@intel.com>
 <CAGyogRa5rF5B_0=U68Dj1A1cyQevO+Qeww-9zAh86ekce+n64A@mail.gmail.com>
 <61731242-db6c-0c5d-bcab-e82b45e324d7@intel.com>
 <CAGyogRZcZPBwj8JcE+--RHqx2SY-sZc0W1M26bSQkBVjyxZ_Mg@mail.gmail.com>
 <d76bffde-506c-49b6-8db6-cfa79ad983d3@intel.com>
 <CAGyogRaO95E=KN-J=oFroXVcPeZrAqOY4T+yDPWcGiHCZMpM0Q@mail.gmail.com>
 <846eed94-2ed7-7b89-5a3e-696ec3674a26@intel.com>
From: Dan Gora <dg@adax.com>
Date: Thu, 27 Sep 2018 20:51:48 -0300
X-Google-Sender-Auth: 0t2diUOzMkcq1dVpkyA6J3Qd9-U
Message-ID: <CAGyogRaNVQqgZLVsAHjH0Hwma6_Y+16CdjLpAkBg+Me3bL7xqw@mail.gmail.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Igor Ryzhov <iryzhov@nfware.com>, 
 Stephen Hemminger <stephen@networkplumber.org>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v2 1/5] kni: add API to set link status on
 kernel interface
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Sep 2018 23:52:29 -0000

On Thu, Sep 27, 2018 at 8:44 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>> Well, yes the link_status (link up, link down) _is_ applied to the KNI
>> interface.  When that occurs, most people want to know what the link
>> speed is that the link came up at.
>
> +1 to this, people would like to know link speed of the interface.
> Are you printing link speed of interface? You are printing whatever user pass to
> API.

There is no such thing as "link speed of the interface".  The link
speed is the speed of the underlying Ethernet link that the interface
corresponds to.  This is true for all other ethernet interfaces in the
kernel.

> I guess you trust to user to provide correct values there, but since only link
> up & down matters, what prevents user to leave other fields, like speed, just
> random values?

Nothing.  What prevents anyone from providing random values for
anything?  The point of the API was to make it super simple, just:

rte_eth_link_get_nowait(portid, &link);
rte_kni_update_link(p[portid]->kni[i], &link);

No messing around with the link info retrieved from
rte_eth_link_get(_nowait), just dump in the struct that was returned.