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 F40F1A00BE for ; Wed, 30 Oct 2019 02:45:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F3C81BEB6; Wed, 30 Oct 2019 02:45:09 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B50C91BEA6; Wed, 30 Oct 2019 02:45:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 18:45:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,245,1569308400"; d="scan'208";a="399989915" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142]) by fmsmga005.fm.intel.com with ESMTP; 29 Oct 2019 18:45:02 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Marvin Liu , stable@dpdk.org Date: Wed, 30 Oct 2019 17:24:20 +0800 Message-Id: <20191030092421.38220-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191028141811.73444-1-yong.liu@intel.com> References: <20191028141811.73444-1-yong.liu@intel.com> Subject: [dpdk-stable] [PATCH v2 1/2] net/virtio: do not limit packed ring size X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Virtio spec only set rule that packed ring maximum size is up to 2^15 entries. Should not limit packed ring size to power of two. Fixes: aea29aa5d37b ("net/virtio: enable packed virtqueues by default") Cc: stable@dpdk.org Signed-off-by: Marvin Liu --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 7d3db4d73..41d323fc9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -465,8 +465,8 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) return -EINVAL; } - if (!rte_is_power_of_2(vq_size)) { - PMD_INIT_LOG(ERR, "virtqueue size is not powerof 2"); + if (!vtpci_packed_queue(hw) && !rte_is_power_of_2(vq_size)) { + PMD_INIT_LOG(ERR, "split virtqueue size is not powerof 2"); return -EINVAL; } -- 2.17.1