From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 2/2] ethtool: add new library to provide ethtool-alike APIs Date: Fri, 5 Jun 2015 13:47:48 +0100 Message-ID: <20150605124748.GA6760@bricha3-MOBL3> References: <1432927612-12244-1-git-send-email-liang-min.wang@intel.com> <20150604075810.0c087b21@urahara> <18146131.KjMWrd7xqb@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: "Wang, Liang-min" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 585D05963 for ; Fri, 5 Jun 2015 14:47:52 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jun 05, 2015 at 11:25:09AM +0000, Wang, Liang-min wrote: >=20 >=20 > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Sent: Friday, June 05, 2015 6:47 AM > > To: Andrew Harvey (agh) > > Cc: Stephen Hemminger; Wang, Liang-min; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 2/2] ethtool: add new library to provi= de > > ethtool-alike APIs > >=20 > > 2015-06-04 22:10, Andrew Harvey: > > > On 6/4/15, 7:58 AM, "Stephen Hemminger" > > wrote: > > > >"Andrew Harvey (agh)" wrote: > > > >> I believe that their is value in this interface for software sta= cks > > > >>not based on Linux being moved toward DPDK that need simple > > > >>operations like getting the mac address. Some of these stacks h= ave > > > >>a dearth of resources available and dedicating a core/thread to = KNI > > > >>to get/set a mac address is considered excessive. There are also > > > >>issues with 32/64 bit kernel integration using KNI. If the > > > >>ethtool interface is not the correct interface then please help = me > > > >>understand what should/could have been used. If ethtool is > > > >>considered 'old and clunky=C2=B9 Stephen's and your input would= be > > > >>valuable in designing another interface with similar properties= . > > > >>The use-case is pretty simple and there is no plans for moving > > > >>anything back into the kernel on the contrary its the complete op= posite. > > > >> > > > >> =E2=80=B9 Andy > > > > > > > >We have DPDK API's to do this, and any added wrappers make it bigg= er. > > > >I don't see why calling your ethtool API is better than calling > > > >rte_eth* API. > > > > > > > >If there is a missing functionality in the rte_ethXXX api's for an > > > >application then add that. For example: rte_eth_mac_addr_get() > > > > > > I am getting somewhat confused by your latest comments. Your first > > > email (referenced below) looked really positive and I found your > > > suggestions useful. Your latest post appears to contradict this and > > > now the interface was there all the time. The wrapper fa=C3=A7ade = provided > > > by the ethtool library provide a clean separation of concerns and w= ill > > > allow people to migrate from not only KNI but in our case from a > > > legacy system. If a software stack has requirements to work with > > > multiple IO abstractions then the ethtool approach is attractive. I > > > would speculate that many other stacks moving towards dpdk will hav= e > > similar issues. > > > > > > Summarizing, for our use-cases the ethtool interface facilitated ou= r > > > adoption to dpdk while allowing us to support our legacy IO abstrac= tions. > >=20 > > Stephen and me say the same thing about using the ethdev API. > > We don't understand why using a fake ethtool lib would be easier. > > Though you are saying it "facilitated [your] adoption to dpdk". > > Please could you explain why using an ethtool-like API is easier than= using > > the existing ethdev API? > > In any case, you have to develop a specific backend for DPDK (rte_eth= tool > > would be also DPDK-specific). >=20 > As described earlier in this patch comment reply, there are other ethto= ol ops that have been implemented. > Those ops includes set/get eeprom, set/get pauseparam, set/get ringpara= m which are not available in the exiting ethdev library. > For this release, we focus on releasing some basic functions (btw, mac_= addr_set is not available but is covered by this patch). > The key reason that this set of library is not released as part of ethd= ev is the ethtool API dependency on kernel include file. > To faithfully carry the ethtool ops and net dev ops API parameters, the= ethtool APIs are designed to follow the original definition except avoid= ing carry kernel states. > With that, to support ethtool APIs faithfully, we need to include .=20 > As suggested by many DPDK veterans including Thomas (indicated over you= r reply), you would prefer these APIs in a separate library. >=20 > >=20 > > It seems you already started to use such an ethtool implementation. > > Please note that our goal is not to prevent Cisco from upstreaming (e= vidence > > with enic driver integration) but we want to guide you, and others ha= ving the > > same needs, to the best solution for everybody. > > That's why we need to understand what we (or you) are missing. > > Maybe that it would be clearer with some code examples (which would g= o in > > the lib documentation if any). > >=20 > > Thanks How about doing this work as a sample application initially, to demonstra= te how an application written using ethtool APIs could be shimmed to use DPDK un= derneath. The ethtool to dpdk mapping could be contained in a single header file (o= r header and c file) inside the sample app. This would allow easy re-use of the sh= im layer, while at the same time not making it part of the core DPDK librari= es. Regards, /Bruce