From: Marvin Liu <yong.liu@intel.com>
To: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com
Cc: dev@dpdk.org, Marvin Liu <yong.liu@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/2] net/virtio: do not limit packed ring size
Date: Wed, 30 Oct 2019 17:24:20 +0800 [thread overview]
Message-ID: <20191030092421.38220-1-yong.liu@intel.com> (raw)
In-Reply-To: <20191028141811.73444-1-yong.liu@intel.com>
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 <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
next prev parent reply other threads:[~2019-10-30 1:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 14:18 [dpdk-dev] [PATCH " 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 ` Marvin Liu [this message]
2019-10-30 9:24 ` [dpdk-dev] [PATCH v2 " 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=20191030092421.38220-1-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@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 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).