From: Marvin Liu Date: Wed, 30 Oct 2019 09:24:20 +0000 (+0800) Subject: net/virtio: do not limit packed ring size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=df42dde55bd3c4bcbe7793ef51c784a567564c49;p=dpdk.git net/virtio: do not limit packed ring size 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 Reviewed-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 646de9945c..044eb10a70 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; }