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 608315A97 for ; Wed, 11 Nov 2015 09:57:41 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 11 Nov 2015 00:57:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,274,1444719600"; d="scan'208";a="848316362" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 11 Nov 2015 00:57:38 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Nov 2015 00:57:37 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Nov 2015 00:57:36 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.42]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.88]) with mapi id 14.03.0248.002; Wed, 11 Nov 2015 16:57:35 +0800 From: "Xu, Qian Q" To: "Liu, Jijiang" , Yuanhan Liu Thread-Topic: [dpdk-dev] [PATCH v4 7/8] virtio/lib:add virtio guest offload capabilities Thread-Index: AQHRHFriHb+fJNVpVU6Eh4QSIUIbFJ6V+duAgAABoYCAAAJ3AIAAhuxg Date: Wed, 11 Nov 2015 08:57:34 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E0317AEE3@shsmsx102.ccr.corp.intel.com> References: <1447224046-1169-1-git-send-email-jijiang.liu@intel.com> <1447224046-1169-8-git-send-email-jijiang.liu@intel.com> <20151111083118.GA2326@yliu-dev.sh.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BDA719@SHSMSX101.ccr.corp.intel.com> <20151111084419.GC2326@yliu-dev.sh.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BDA74A@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BDA74A@SHSMSX101.ccr.corp.intel.com> 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 Cc: "dev@dpdk.org" , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH v4 7/8] virtio/lib:add virtio guest offload capabilities X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 08:57:42 -0000 Frank,=20 Thanks Qian -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Liu, Jijiang Sent: Wednesday, November 11, 2015 4:53 PM To: Yuanhan Liu Cc: dev@dpdk.org; Michael S. Tsirkin Subject: Re: [dpdk-dev] [PATCH v4 7/8] virtio/lib:add virtio guest offload = capabilities > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Wednesday, November 11, 2015 4:44 PM > To: Liu, Jijiang > Cc: Michael S. Tsirkin; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 7/8] virtio/lib:add virtio guest=20 > offload capabilities >=20 > On Wed, Nov 11, 2015 at 08:38:29AM +0000, Liu, Jijiang wrote: > > > > > > > -----Original Message----- > > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > > Sent: Wednesday, November 11, 2015 4:31 PM > > > To: Liu, Jijiang; Michael S. Tsirkin > > > Cc: dev@dpdk.org > > > Subject: Re: [dpdk-dev] [PATCH v4 7/8] virtio/lib:add virtio guest=20 > > > offload capabilities > > > > > > On Wed, Nov 11, 2015 at 02:40:45PM +0800, Jijiang Liu wrote: > > > > Add virtio guest offload capabilities. > > > > > > > > Signed-off-by: Jijiang Liu > > > > --- > > > > lib/librte_vhost/virtio-net.c | 5 ++++- > > > > 1 files changed, 4 insertions(+), 1 deletions(-) > > > > > > > > diff --git a/lib/librte_vhost/virtio-net.c=20 > > > > b/lib/librte_vhost/virtio-net.c index 81bd309..839a333 100644 > > > > --- a/lib/librte_vhost/virtio-net.c > > > > +++ b/lib/librte_vhost/virtio-net.c > > > > @@ -80,7 +80,10 @@ static struct virtio_net_config_ll *ll_root; > > > > (1ULL << > > > VHOST_USER_F_PROTOCOL_FEATURES) | \ > > > > (1ULL << VIRTIO_NET_F_HOST_TSO4) | \ > > > > (1ULL << VIRTIO_NET_F_HOST_TSO6) | \ > > > > - (1ULL << VIRTIO_NET_F_CSUM)) > > > > + (1ULL << VIRTIO_NET_F_CSUM) | \ > > > > + (1ULL << VIRTIO_NET_F_GUEST_CSUM) | \ > > > > + (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \ > > > > + (1ULL << VIRTIO_NET_F_GUEST_TSO6)) > > > > > > I don't think we need that, and it might be wrong to set those=20 > > > fields at > vhost. > > > > > > And, TBH, I am not 100% sure that I understand what those flags=20 > > > truely are and for. All I know is that they seem have something to=20 > > > do with QEMU/TAP device. > > > > According to virtio standard, those fileds should be set. >=20 > If so, you'd better quote them here, or even to your patch commit. In the Virtual I/O Device (VIRTIO) Version 1.0 Committee Specification 02,= =20 [QIAN] Do we support virtio 1.0 in the vhost offload case? Currently it's v= irtio 0.95 Spec that we are testing.=20 (1) VIRTIO_NET_F_GUEST_CSUM (1) Driver handles packets with partial checksu= m. (2) If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated, the VIRTIO_NET_H= DR_F_NEEDS_- CSUM bit in flags MAY be set: if so, the checksum on the packe= t is incomplete and csum_start and csum_offset indicate how to calculate it= (see Packet Transmission point 1). (3) If the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options were negotiated, th= en gso_type MAY be something other than VIRTIO_NET_HDR_GSO_NONE, and gso_si= ze field indicates the desired MSS (see Packet Transmission point 2). The information can be included in the next version of patch set. > --yliu >=20 > > Yes, I'd like to listen other guys comments. > > > > > Hopefully the virtio expert, Michael, could shine some lights on that= . > > > > > > --yliu > > > > > > > > > > > static uint64_t VHOST_FEATURES =3D VHOST_SUPPORTED_FEATURES; > > > > > > > > -- > > > > 1.7.7.6