From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA7CEA00BE; Tue, 29 Oct 2019 14:07:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 809E41BEB9; Tue, 29 Oct 2019 14:07:27 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3458C1BDFD for ; Tue, 29 Oct 2019 14:07:25 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 06:07:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,244,1569308400"; d="scan'208";a="230051712" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by fmsmga002.fm.intel.com with ESMTP; 29 Oct 2019 06:07:24 -0700 Date: Tue, 29 Oct 2019 21:08:15 +0800 From: Tiwei Bie To: Marvin Liu Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org Message-ID: <20191029130815.GA7313@___> References: <20191028141811.73444-1-yong.liu@intel.com> <20191028141811.73444-2-yong.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191028141811.73444-2-yong.liu@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH 2/2] vhost: do not limit packed ring size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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 >