DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
	"Huawei@dpdk.org" <Huawei@dpdk.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the	same buffer
Date: Mon, 14 Dec 2015 01:21:45 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B4BB92519@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E36671D59@SHSMSX103.ccr.corp.intel.com>

On 12/12/2015 3:39 PM, Tan, Jianfeng wrote:
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei@dpdk.org
>> Sent: Friday, December 11, 2015 12:08 AM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the
>> same buffer
>>
>> The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause
>> issue because in the simple TX mode we don't use the header. This patch
>> makes the header desc point to different buffer.
>>
>> Signed-off-by: Huawei Xie <huawei.xie@intel.com>
>> ---
>>  drivers/net/virtio/virtio_rxtx.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
>> index 74b39ef..6cfd315 100644
>> --- a/drivers/net/virtio/virtio_rxtx.c
>> +++ b/drivers/net/virtio/virtio_rxtx.c
>> @@ -352,7 +352,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int
>> queue_type)
>>  				vq->vq_ring.desc[i + mid_idx].next = i;
>>  				vq->vq_ring.desc[i + mid_idx].addr =
>>  					vq->virtio_net_hdr_mem +
>> -						mid_idx * vq->hw-
>>> vtnet_hdr_size;
>> +						i * vq->hw->vtnet_hdr_size;
>>  				vq->vq_ring.desc[i + mid_idx].len =
>>  					vq->hw->vtnet_hdr_size;
>>  				vq->vq_ring.desc[i + mid_idx].flags =
>> --
>> 1.8.1.4
> So in the case when header is not used, shall the way of pointing to all header bufs to one buf
> help  improve the performance? At least, it saves some of cache lines.
If we don't touch the virtio_net buffer, it doesn't help performance
pointing to same buffer.
>
> Thanks,
> Jianfeng
>


  reply	other threads:[~2015-12-14  1:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 16:07 Huawei
2015-12-12  7:39 ` Tan, Jianfeng
2015-12-14  1:21   ` Xie, Huawei [this message]
2015-12-14  1:35 ` Tan, Jianfeng
2015-12-14  3:01 ` Yuanhan Liu
2015-12-14  9:32   ` Thomas Monjalon
2015-12-14 11:47     ` Yuanhan Liu
2015-12-14 12:44       ` Thomas Monjalon
2015-12-14 13:09         ` Yuanhan Liu
2015-12-14 13:38           ` Xie, Huawei
2015-12-14 13:45             ` Thomas Monjalon
2015-12-14 13:58               ` Xie, Huawei
2016-02-10 15:36                 ` Bruce Richardson
2015-12-10 17:57 [dpdk-dev] [PATCH 0/4] vhost: Fix various coverity issues in vhost library Huawei
2015-12-10 17:57 ` [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer Huawei

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=C37D651A908B024F974696C65296B57B4BB92519@SHSMSX103.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=Huawei@dpdk.org \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@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).