From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <michael.qiu@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 184D528FD
 for <dev@dpdk.org>; Wed, 23 Mar 2016 03:47:38 +0100 (CET)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga103.fm.intel.com with ESMTP; 22 Mar 2016 19:47:38 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.24,380,1455004800"; d="scan'208";a="674151485"
Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204])
 by FMSMGA003.fm.intel.com with ESMTP; 22 Mar 2016 19:47:38 -0700
Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by
 FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 22 Mar 2016 19:47:37 -0700
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 22 Mar 2016 19:47:37 -0700
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002;
 Wed, 23 Mar 2016 10:47:35 +0800
From: "Qiu, Michael" <michael.qiu@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: Kyle Larose <eomereadig@gmail.com>, Thomas Monjalon
 <thomas.monjalon@6wind.com>, "Zhang, Helin" <helin.zhang@intel.com>,
 "Stephen Hemminger" <stephen@networkplumber.org>, "dev@dpdk.org"
 <dev@dpdk.org>
Thread-Topic: [dpdk-dev] DPDK and HW offloads
Thread-Index: AQHRgrNHrZMwEFSWME2cIx8wAcyncg==
Date: Wed, 23 Mar 2016 02:47:35 +0000
Message-ID: <533710CFB86FA344BFBF2D6802E6028622F7208E@SHSMSX101.ccr.corp.intel.com>
References: <20160318101611.2df26ef6@xeon-e3> <10753400.05iPBPOT6f@xps13>
 <F35DEAC7BCE34641BA9FAC6BCA4A12E70A9CD70B@SHSMSX104.ccr.corp.intel.com>
 <29795767.yLuRT7a5hO@xps13> <20160321145249.GA16732@bricha3-MOBL3>
 <CAMFWN9=daa-aNdi3+xE=zPt2kndTwgZCZ1YbxnWXyJNpY42EjA@mail.gmail.com>
 <533710CFB86FA344BFBF2D6802E6028622F70D9D@SHSMSX101.ccr.corp.intel.com>
 <20160322101941.GB19268@bricha3-MOBL3>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] DPDK and HW offloads
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Mar 2016 02:47:39 -0000

On 3/22/2016 6:20 PM, Richardson, Bruce wrote:=0A=
> On Tue, Mar 22, 2016 at 05:50:28AM +0000, Qiu, Michael wrote:=0A=
>> On 3/21/2016 11:27 PM, Kyle Larose wrote:=0A=
>>> On Mon, Mar 21, 2016 at 10:52 AM, Bruce Richardson=0A=
>>> <bruce.richardson@intel.com> wrote:=0A=
>>>> On Sun, Mar 20, 2016 at 08:18:57PM +0100, Thomas Monjalon wrote:=0A=
>>>>> 2016-03-20 14:17, Zhang, Helin:=0A=
>>>>>> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]=0A=
>>>>>>> 2016-03-18 10:16, Stephen Hemminger:=0A=
>>>>>>>> Right now, all those offload features are pretty much unusable in =
a=0A=
>>>>>>>> real product without lots and lots of extra codes and huge bug=0A=
>>>>>>>> surface. It bothers me enough that I would recommend removing much=
 of the=0A=
>>>>>>> filter/offload/ptype stuff from DPDK!=0A=
>>>>>>>=0A=
>>>>>>> One of the biggest challenge is to think about a good filtering API=
.=0A=
>>>>>>> The offloading has some interaction with the mbuf struct.=0A=
>>>>>>>=0A=
>>>>>>> I would like to suggest rewriting ethdev API by keeping it as is fo=
r some time for=0A=
>>>>>>> compatibility while creating a new one. What about the prefix dpdk_=
netdev_ to=0A=
>>>>>>> progressively replace rte_eth_dev?=0A=
>>>>>> I totally agree with to add new and generic APIs for user applicatio=
ns. But I don't=0A=
>>>>>> think we need to remove all current APIs. Generic APIs may not suppo=
rt all advanced=0A=
>>>>>> hardware features, while specific APIs can. Why not support all? One=
 generic APIs for=0A=
>>>>>> common users, and others APIs for advanced users.=0A=
>>>>> Yes we cannot access to every features of a device through generic AP=
I.=0A=
>>>>> Until now we were trying to add an ethdev API for every features even=
 if it=0A=
>>>>> is used by only one driver.=0A=
>>>>> I think we should allow a direct access to the driver by the applicat=
ions and=0A=
>>>>> work on generic API only for common features.=0A=
>>>> Definite +1.=0A=
>>>> I think that we need to start pushing driver-specific functionality to=
 get exposed=0A=
>>>> via a driver's header files. That allow users who want to extract the =
max=0A=
>>>> functionality from a particular NIC to do so via those APIs calls, whi=
le not=0A=
>>>> polluting the generic ethdev layer.=0A=
>>>>=0A=
>>> What sort of requirements on ABI/API compatibility would this place on=
=0A=
>>> the drivers? I would hope that it would be treated like any other=0A=
>>> public API within DPDK. I don't think this would be too onerous, but=0A=
>>> it would require that the drivers be designed to deal with it. (I.e.=0A=
>>> don't just expose any old internal driver function).=0A=
>> Why not to implement one simple API with variable arguments, just like=
=0A=
>> syscall ioctl() does. And drivers implement it's specific hardware=0A=
>> features with a feature bit param, and other needed variable arguments.=
=0A=
>>=0A=
>> Thanks,=0A=
>> Michael=0A=
> A very much dislike that idea. =0A=
> * It makes the code much harder to read as you have to closely examine al=
l the=0A=
>   parameters to work out what a function call is actually meant to do.=0A=
=0A=
It's not a big deal, if we have a document.=0A=
=0A=
> * It makes it much harder to see that you have an implicit dependency on =
a=0A=
>   specific device. Having to include a driver specific header file e.g. i=
40e.h,=0A=
>   and call a function named e.g. i40e_do_magic_stuff(), makes it pretty e=
xplicit=0A=
>   that you have a dependency on i40e-based hardware=0A=
=0A=
Software does not want to bind to specific hardware I think, what about=0A=
the transportability?=0A=
=0A=
> * It prevents the compiler from doing type-checking on parameters and inf=
orming=0A=
>   you of little inconsistencies.=0A=
=0A=
Maybe, we could do self-check for the parameters I think.=0A=
=0A=
>=0A=
> For all these reasons, I prefer the device-specific functions option. How=
ever,=0A=
> at the same time, we also need to ensure we have a reasonable set of gene=
ric=0A=
> APIs so that the cases where users are forced to drop down to the lower-l=
evel=0A=
> device-specific primitives are reduced.=0A=
=0A=
For software, it do not care which hardware it is, it only cares about=0A=
what ability you have.=0A=
=0A=
Thanks,=0A=
Michael=0A=
=0A=
> Regards,=0A=
> /Bruce=0A=
>=0A=
>>>> On the other hand, I don't like the idea of dpdk_netdev. I think we ca=
n work=0A=
>>>> within the existing rte_eth_dev framework.=0A=
>>>>=0A=
>>>> /Bruce=0A=
>>>>=0A=
>>=0A=
=0A=