From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 612791B150 for ; Thu, 27 Sep 2018 23:50:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 14:50:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,312,1534834800"; d="scan'208";a="73607177" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.252.3.51]) ([10.252.3.51]) by fmsmga007.fm.intel.com with ESMTP; 27 Sep 2018 14:49:39 -0700 To: Dan Gora Cc: dev@dpdk.org, Igor Ryzhov , Stephen Hemminger 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> <61731242-db6c-0c5d-bcab-e82b45e324d7@intel.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: Date: Thu, 27 Sep 2018 22:49:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2018 21:50:11 -0000 On 9/27/2018 4:40 PM, Dan Gora wrote: > On Thu, Sep 27, 2018 at 8:35 AM Ferruh Yigit wrote: >> >> On 9/26/2018 7:56 PM, Dan Gora wrote: >>> On Wed, Sep 26, 2018 at 1:42 PM, Ferruh Yigit wrote: >>>>> There is nothing to "reflect" to the kernel interface, nor to apply to >>>>> the kernel interface. This is exactly how every other kernel driver >>>>> works on link status changes. There is no "netif_set_speed()' >>>>> function. When a link status change occurs the kernel driver calls >>>>> netif_carrier_on/off() and prints a message like this one. >>>> >>>> I am not suggesting reflecting these into interface, I am just saying why do you >>>> print them? >>> >>> Because the information is useful and because every other Ethernet >>> driver does the same thing when the link status changes. >> >> It would be useful if it writes the values of virtual interface, but this API >> prints user input. >> > I'm sorry, Ferruh, I really don't understand what you are referring to > here. What virtual interface are you talking about? Virtual interface is KNI interface, Linux virtual network interface. Let me try again, You are adding a new API to KNI library, which is to set link status of KNI interface. This API prints some link related values in its log. But these values are not applied to KNI interface or not the values coming from KNI interface. These are just values provided by user to the API, I am saying printing these values in log can be confusing, the user may think API applies these values to KNI interface. > >> The virtual interface may have different value, this API doesn't change anything >> related other than link status, so why print user provided value. > > Again, because all this information is useful if the KNI interface is > reflecting the state of a real physical ethenet interface. If the KNI > interface is not reflecting a real peice of hardware, the user can > continue not using this new API function or do something like set the > speed to 0. This is what we get from ENA PMD drivers on amazon for > instance. It's perfectly reasonable. > >> >> Won't you think it will be confusing if the virtual interface values are >> different than what printed. > > If what values are different from what? I'm really confused as to > what use case you are referring to here. Can you give a concrete > example? > >> Or won't user will think API changed those values to printed one in interface? > > again, what values? Changed how? >