From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <changchun.ouyang@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id DC175C338
 for <dev@dpdk.org>; Thu, 28 May 2015 17:22:48 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga101.jf.intel.com with ESMTP; 28 May 2015 08:22:48 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.13,513,1427785200"; d="scan'208";a="736808113"
Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105])
 by orsmga002.jf.intel.com with ESMTP; 28 May 2015 08:22:08 -0700
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS)
 id 14.3.224.2; Thu, 28 May 2015 23:22:06 +0800
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.109]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.180]) with mapi id 14.03.0224.002;
 Thu, 28 May 2015 23:22:04 +0800
From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>, Wei li <liw@dtdream.com>
Thread-Topic: [dpdk-dev] [PATCH] vhost: tcp pkt with virtio header in one desc
Thread-Index: AQHQmR8mdLksdYy5H0uYczowTfzJwJ2Q8u0AgACN+KA=
Date: Thu, 28 May 2015 15:22:04 +0000
Message-ID: <F52918179C57134FAEC9EA62FA2F962511B6C699@shsmsx102.ccr.corp.intel.com>
References: <8975cbf4-0f4d-4da4-8e45-6b75629072e1@liw0310-PC.local>
 <20150528075030.7ad1a9d4@urahara>
In-Reply-To: <20150528075030.7ad1a9d4@urahara>
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>
Subject: Re: [dpdk-dev] [PATCH] vhost: tcp pkt with virtio header in one desc
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: Thu, 28 May 2015 15:22:49 -0000

Pls see the patch: "Fix vhost enqueue/dequeue issue" for more fixing on the=
 vhost enqueue/dequeue.
We don't need this duplicated fix and it only fixes partial issue.
Thanks
Changchun


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> Hemminger
> Sent: Thursday, May 28, 2015 10:51 PM
> To: Wei li
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] vhost: tcp pkt with virtio header in one =
desc
>=20
> On Thu, 28 May 2015 16:19:44 +0800
> Wei li <liw@dtdream.com> wrote:
>=20
> > +		if (desc->flags & VRING_DESC_F_NEXT)
> > +		{
> > +			/* Discard first buffer as it is the virtio header */
> > +			desc =3D &vq->desc[desc->next];
> > +			vb_offset =3D 0;
> > +			vb_avail =3D desc->len;
> > +		}
> > +		else /* virtio header in one desc with real pkt */
> > +		{
> > +			/* strip the virtio header */
> > +			vb_offset =3D vq->vhost_hlen;
> > +			vb_avail =3D desc->len - vq->vhost_hlen;
> > +
> This code looks correct, but please follow the same style as other code i=
n the
> driver. The virtio driver uses Linux/BSD
> style:
> 	if () {
> 	} else {
> 	}