All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: Marvin Liu <yong.liu@intel.com>
Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] vhost: do not limit packed ring size
Date: Tue, 29 Oct 2019 21:08:15 +0800	[thread overview]
Message-ID: <20191029130815.GA7313@___> (raw)
In-Reply-To: <20191028141811.73444-2-yong.liu@intel.com>

On Mon, Oct 28, 2019 at 10:18:11PM +0800, Marvin Liu wrote:
> Virtio spec only set rule that packed ring maximum size is up to 2^15
> entries. Do not limit packed ring size to power of two.

Please add a "Fixes:" line.

> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> ---
>  lib/librte_vhost/vhost_user.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 87dc3fc53..bbf323373 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -363,8 +363,21 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
>  	 *
>  	 *   Queue Size value is always a power of 2. The maximum Queue Size
>  	 *   value is 32768.
> +	 *
> +	 * VIRTIO 1.1 2.7 Virtqueues says:
> +	 *
> +	 *   Packed virtqueues support up to 2^15 entries each.
>  	 */
> -	if ((vq->size & (vq->size - 1)) || vq->size > 32768) {
> +	if (!vq_is_packed(dev)) {
> +		if (vq->size & (vq->size - 1)) {
> +			RTE_LOG(ERR, VHOST_CONFIG,
> +				"invalid virtqueue size %u\n", vq->size);
> +			return RTE_VHOST_MSG_RESULT_ERR;
> +		}
> +
> +	}

Please remove above empty line.

> +
> +	if (vq->size > 32768) {
>  		RTE_LOG(ERR, VHOST_CONFIG,
>  			"invalid virtqueue size %u\n", vq->size);
>  		return RTE_VHOST_MSG_RESULT_ERR;
> -- 
> 2.17.1
> 

  reply	other threads:[~2019-10-29 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 14:18 [dpdk-dev] [PATCH 1/2] net/virtio: do not limit packed ring size Marvin Liu
2019-10-28 14:18 ` [dpdk-dev] [PATCH 2/2] vhost: " Marvin Liu
2019-10-29 13:08   ` Tiwei Bie [this message]
2019-10-30  9:24 ` [dpdk-dev] [PATCH v2 1/2] net/virtio: " Marvin Liu
2019-10-30  9:24   ` [dpdk-dev] [PATCH v2 2/2] vhost: " Marvin Liu
2019-11-04  4:54     ` Tiwei Bie
2019-11-06 14:19     ` Maxime Coquelin
2019-11-06 20:58     ` Maxime Coquelin
2019-11-04  4:51   ` [dpdk-dev] [PATCH v2 1/2] net/virtio: " Tiwei Bie
2019-11-06 14:14   ` Maxime Coquelin
2019-11-06 20:58   ` Maxime Coquelin

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=20191029130815.GA7313@___ \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=yong.liu@intel.com \
    --cc=zhihong.wang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.