[dpdk-dev] [PATCH] vhost: tcp pkt with virtio header in one desc

Ouyang, Changchun changchun.ouyang at intel.com
Thu May 28 17:22:04 CEST 2015


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


More information about the dev mailing list