From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2 1/5] kni: add API to set link status on kernel interface Date: Fri, 28 Sep 2018 00:44:42 +0100 Message-ID: <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> <61731242-db6c-0c5d-bcab-e82b45e324d7@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Igor Ryzhov , Stephen Hemminger To: Dan Gora Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 6340B1B173 for ; Fri, 28 Sep 2018 01:44:52 +0200 (CEST) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/28/2018 12:05 AM, Dan Gora wrote: > On Thu, Sep 27, 2018 at 6:49 PM, Ferruh Yigit wrote: >>>> 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. > > 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. 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? > Again, this is how every other > Ethernet driver in linux works. I doubt that someone would be > confused by that. > > If the KNI interface is purely virtual (that is, it does not > correspond to any physical Ethernet port), then the DPDK application > writer is under no obligation to use this API function, or they can > use it and just set the speed to 0. If the end user understands that > the KNI interface is purely virtual, then they should not be confused > that the speed is 0 or that the duplex/autoNeg values are irrelevant. > > I just don't see how this could cause any confusion. >