DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "Xie, Huawei" <huawei.xie@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: remove unnecessary memset for virtio net hdr
Date: Thu, 17 Mar 2016 21:52:10 +0100	[thread overview]
Message-ID: <1469207.ypjzrBGlMb@xps13> (raw)
In-Reply-To: <C37D651A908B024F974696C65296B57B4C672634@SHSMSX101.ccr.corp.intel.com>

2016-03-17 01:19, Xie, Huawei:
> On 3/16/2016 2:44 PM, Yuanhan Liu wrote:
> > We have to reset the virtio net hdr at virtio_enqueue_offload()
> > before, due to all mbufs share a single virtio_hdr structure:
> >
> > 	struct virtio_net_hdr_mrg_rxbuf virtio_hdr = {{0, }, 0};
> >
> > 	foreach (mbuf) {
> > 		virtio_enqueue_offload(mbuf, &virtio_hdr.hdr);
> >
> > 		copy net hdr and mbuf to desc buf
> > 	}
> >
> > However, after the vhost rxtx refactor, the code looks like:
> >
> > 	copy_mbuf_to_desc(mbuf)
> > 	{
> > 		struct virtio_net_hdr_mrg_rxbuf virtio_hdr = {{0, }, 0}
> >
> > 		virtio_enqueue_offload(mbuf, &virtio_hdr.hdr);
> >
> > 		copy net hdr and mbuf to desc buf
> > 	}
> >
> > 	foreach (mbuf) {
> > 		copy_mbuf_to_desc(mbuf);
> > 	}
> >
> > Therefore, the memset at virtio_enqueue_offload() is not necessary
> > any more; remove it.
> >
> > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> Acked-by: Huawei Xie <huawei.xie@intel.com>

Applied, thanks

      reply	other threads:[~2016-03-17 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  6:44 Yuanhan Liu
2016-03-17  1:19 ` Xie, Huawei
2016-03-17 20:52   ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469207.ypjzrBGlMb@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).