DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/virtio: do not limit packed ring size
@ 2019-10-28 14:18 Marvin Liu
  2019-10-28 14:18 ` [dpdk-dev] [PATCH 2/2] vhost: " Marvin Liu
  2019-10-30  9:24 ` [dpdk-dev] [PATCH v2 1/2] net/virtio: " Marvin Liu
  0 siblings, 2 replies; 11+ messages in thread
From: Marvin Liu @ 2019-10-28 14:18 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev, Marvin Liu

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.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-06 20:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).