From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jijiang.liu@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 386B35A38
 for <dev@dpdk.org>; Wed,  4 Nov 2015 14:08:57 +0100 (CET)
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga101.jf.intel.com with ESMTP; 04 Nov 2015 05:08:24 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.20,243,1444719600"; d="scan'208";a="678152266"
Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201])
 by orsmga003.jf.intel.com with ESMTP; 04 Nov 2015 05:08:24 -0800
Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by
 FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Wed, 4 Nov 2015 05:08:23 -0800
Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by
 fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Wed, 4 Nov 2015 05:08:23 -0800
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.57]) by
 shsmsx102.ccr.corp.intel.com ([169.254.2.199]) with mapi id 14.03.0248.002;
 Wed, 4 Nov 2015 21:08:22 +0800
From: "Liu, Jijiang" <jijiang.liu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload
Thread-Index: AQHRFu89DSl6C3bBZkC4lqvvuDZDwp6LMNoAgACb7zCAAAia8A==
Date: Wed, 4 Nov 2015 13:08:21 +0000
Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BCFE6F@SHSMSX101.ccr.corp.intel.com>
References: <1446634456-413-1-git-send-email-jijiang.liu@intel.com>
 <1446634456-413-7-git-send-email-jijiang.liu@intel.com>
 <2611781.I9AKvK5K3K@xps13> 
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" <dev@dpdk.org>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload
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, 04 Nov 2015 13:08:57 -0000



> -----Original Message-----
> From: Liu, Jijiang
> Sent: Wednesday, November 4, 2015 8:52 PM
> To: 'Thomas Monjalon'
> Cc: dev@dpdk.org; Michael S. Tsirkin
> Subject: RE: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX
> offload
>=20
> Hi Thomas,
>=20
>=20
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Wednesday, November 4, 2015 7:18 PM
> > To: Liu, Jijiang
> > Cc: dev@dpdk.org; Michael S. Tsirkin
> > Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost
>=20
>=20
> The following code is not in the patch 6, please review the latest patch =
set.

Got it. You copy the codes from vhost side here for the comparison. The v3 =
is latest.

>=20
> > > +	parse_ethernet(m, &l4_proto, &l4_hdr);
> > > +	if (hdr->flags =3D=3D VIRTIO_NET_HDR_F_NEEDS_CSUM) {
> > > +		if ((hdr->csum_start =3D=3D m->l2_len) &&
> > > +			(hdr->csum_offset =3D=3D offsetof(struct ipv4_hdr,
> > > +						hdr_checksum)))
> > > +			m->ol_flags |=3D PKT_TX_IP_CKSUM;
> > > +		else if (hdr->csum_start =3D=3D (m->l2_len + m->l3_len)) {
> > > +			switch (hdr->csum_offset) {
> > > +			case (offsetof(struct tcp_hdr, cksum)):
> > > +				if (l4_proto =3D=3D IPPROTO_TCP)
> > > +					m->ol_flags |=3D PKT_TX_TCP_CKSUM;
> > > +				break;
> > > +			case (offsetof(struct udp_hdr, dgram_cksum)):
> > > +				if (l4_proto =3D=3D IPPROTO_UDP)
> > > +					m->ol_flags |=3D PKT_TX_UDP_CKSUM;
> > > +				break;
> > > +			case (offsetof(struct sctp_hdr, cksum)):
> > > +				if (l4_proto =3D=3D IPPROTO_SCTP)
> > > +					m->ol_flags |=3D PKT_TX_SCTP_CKSUM;
> > > +				break;
> > > +			default:
> > > +				break;
> > > +			}
> > > +		}
> >
> > The kernel doesn't work this way.
> > Please could you check that your virtio implementation works with a
> vanilla
> > Linux with or without vhost?
> > Thanks
>=20
> This is vhost lib implementation, not virtio-net side.
> We have already validated with a vanilla Linux with or without virtio-net=
,
> and it passed.
> Could you please review latest patch v3?
>=20
> Xu Qian can send the test report out.