From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <danny.zhou@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 12A2F7F54
 for <dev@dpdk.org>; Wed,  5 Nov 2014 23:43:56 +0100 (CET)
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga102.fm.intel.com with ESMTP; 05 Nov 2014 14:53:20 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.07,322,1413270000"; d="scan'208";a="617843043"
Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82])
 by fmsmga001.fm.intel.com with ESMTP; 05 Nov 2014 14:49:05 -0800
Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by
 PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Thu, 6 Nov 2014 06:48:36 +0800
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by
 shsmsx102.ccr.corp.intel.com ([169.254.2.156]) with mapi id 14.03.0195.001;
 Thu, 6 Nov 2014 06:48:35 +0800
From: "Zhou, Danny" <danny.zhou@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Thread-Topic: [dpdk-dev] bifurcated driver
Thread-Index: AQHP+Pi+EFacz72k3UuzHEADinhAXJxSnTYg
Date: Wed, 5 Nov 2014 22:48:34 +0000
Message-ID: <DFDF335405C17848924A094BC35766CF0A98FBC5@SHSMSX104.ccr.corp.intel.com>
References: <26FA93C7ED1EAA44AB77D62FBE1D27BA54C42C29@IRSMSX102.ger.corp.intel.com>
 <26FA93C7ED1EAA44AB77D62FBE1D27BA54C4620C@IRSMSX102.ger.corp.intel.com>
 <26FA93C7ED1EAA44AB77D62FBE1D27BA54C46444@IRSMSX102.ger.corp.intel.com>
 <4163036.7ZLDrAu3iM@xps13>
In-Reply-To: <4163036.7ZLDrAu3iM@xps13>
Accept-Language: zh-CN, 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
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Fastabend,
 John R" <john.r.fastabend@intel.com>
Subject: Re: [dpdk-dev] bifurcated driver
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, 05 Nov 2014 22:43:57 -0000

Hi Thomas,

Thanks for sharing the links to ibverbs, I will take a close look at it and=
 compare it to bifurcated driver. My take
after a rough review is that idea is very much similar, but bifurcated driv=
er implementation is generic for any=20
Ethernet device based on existing af_packet mechanism, with extension of ex=
changing the messages between=20
user space and kernel space driver.

I have an internal document to summary the pros and cons of below solutions=
, except for ibvers, but=20
will be adding it shortly.

- igb_uio
- uio_pci_generic
- VFIO
- bifurcated driver

Short answers to your questions:
> 	- upstream status
Adding IOMMU based memory protection and generic descriptor description sup=
port now, into version 2=20
kernel patches.

> 	- usable with kernel netdev
af_packet based, and relevant patchset will be submitted to netdev for sure=
.

> 	- usable in a vm
No, it does no coexist with SRIOV for number of reasons. but if you pass-th=
rough a PF to a VM, it works perfect.

> 	- usable for Ethernet
It could work with all Ethernet NICs, as flow director is available and NIC=
 driver support new net_ops to split off=20
queue pairs for user space.

> 	- hardware requirements
No specific hardware requirements. All mainstream NICs have multiple qpairs=
 and flow director support.=20

> 	- security protection
Leverage IOMMU to provide memory protection on Intel platform. Other archs =
provide similar memory protection
mechanism, so we only use arch-agnostic DMA memory allocation APIs in kerne=
l to support memory protection.

> 	- performance
DPDK native performance on user space queues, as long as drop_en is enabled=
 to avoid head-of-line blocking.

-Danny

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, November 05, 2014 9:01 PM
> To: Zhou, Danny
> Cc: dev@dpdk.org; Fastabend, John R
> Subject: Re: [dpdk-dev] bifurcated driver
>=20
> Hi Danny,
>=20
> 2014-10-31 17:36, O'driscoll, Tim:
> > Bifurcated Driver (Danny.Zhou@intel.com)
>=20
> Thanks for the presentation of bifurcated driver during the community cal=
l.
> I asked if you looked at ibverbs and you wanted a link to check.
> The kernel module is here:
> 	http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/driv=
ers/infiniband/core
> The userspace library:
> 	http://git.kernel.org/cgit/libs/infiniband/libibverbs.git
>=20
> Extract from Kconfig:
> "
> config INFINIBAND_USER_ACCESS
> 	tristate "InfiniBand userspace access (verbs and CM)"
> 	select ANON_INODES
> 	---help---
> 	  Userspace InfiniBand access support.  This enables the
> 	  kernel side of userspace verbs and the userspace
> 	  communication manager (CM).  This allows userspace processes
> 	  to set up connections and directly access InfiniBand
> 	  hardware for fast-path operations.  You will also need
> 	  libibverbs, libibcm and a hardware driver library from
> 	  <http://www.openfabrics.org/git/>.
> "
>=20
> It seems to be close to the bifurcated driver needs.
> Not sure if it can solve the security issues if there is no dedicated MMU
> in the NIC.
>=20
> I feel we should sum up pros and cons of
> 	- igb_uio
> 	- uio_pci_generic
> 	- VFIO
> 	- ibverbs
> 	- bifurcated driver
> I suggest to consider these criterias:
> 	- upstream status
> 	- usable with kernel netdev
> 	- usable in a vm
> 	- usable for ethernet
> 	- hardware requirements
> 	- security protection
> 	- performance
>=20
> --
> Thomas