DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: huawei.xie@intel.com, dev@dpdk.org, vkaplans@redhat.com, mst@redhat.com
Subject: Re: [dpdk-dev] [RFC] vhost: Add indirect descriptors support to the TX path
Date: Wed, 3 Aug 2016 22:03:05 +0800	[thread overview]
Message-ID: <20160803140305.GD30752@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1468333932-26509-1-git-send-email-maxime.coquelin@redhat.com>

On Tue, Jul 12, 2016 at 04:32:12PM +0200, Maxime Coquelin wrote:
> Indirect descriptors are usually supported by virtio-net devices,
> allowing to dispatch a large number of large requests.
> 
> When the virtio device sends a packet using indirect descriptors,
> only one slot is used in the ring, even for large packets.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> I have a two questions regarding the implementation of this feature:
> 
> 1. Should I add a check to ensure the indirect feature is supported
> (i.e. the negociation succeeded) when having an indirect desc?
> 
> 2. Should I check in copy_desc_to_mbuf() that we don't have a nested
> indirect descriptor?
> 
> Both these sanity checks are recommended from the virtio spec, but
> since it is to be done in the hot path, it may introduce some
> performance penalties.
> 
> Note that the first check is not done in the Kernel vhost driver, whereas
> the second one is.

I think we could firstly follow the Linux kernel implementation.

> +		if (vq->desc[desc_indexes[i]].flags & VRING_DESC_F_INDIRECT) {
> +			desc = (struct vring_desc *)gpa_to_vva(dev,
> +					vq->desc[desc_indexes[i]].addr);
> +			rte_prefetch0(desc);
> +			size = vq->desc[desc_indexes[i]].len / sizeof(*desc);
> +			idx = 0;
> +		} else {
> +			desc = vq->desc;
> +			size = vq->size;
> +			idx = desc_indexes[i];

Why not fetching the desc here and feeding it to copy_desc_to_mbuf(),
instead of using "desc" and "idx" combination and fetching it inside
that function?

Overall, this patch looks good to me. As stated in IRC, It'd be great
if you could offer some performance data.

Thanks for the work, and apologize for the late review!

	--yliu

  reply	other threads:[~2016-08-03 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 14:32 Maxime Coquelin
2016-08-03 14:03 ` Yuanhan Liu [this message]
2016-08-05 12:18   ` Maxime Coquelin
2016-09-21  2:41     ` Yuanhan Liu

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=20160803140305.GD30752@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=vkaplans@redhat.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).