From: Dragos Tatulea <dtatulea@nvidia.com>
To: "Michael S . Tsirkin" <mst@redhat.com>,
Eugenio Perez Martin <eperezma@redhat.com>,
<virtualization@lists.linux.dev>
Cc: Dragos Tatulea <dtatulea@nvidia.com>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Gal Pressman <gal@nvidia.com>,
<stable@vger.kernel.org>
Subject: [PATCH 2/3] vdpa/mlx5: Increase the maximum virtqueue size
Date: Mon, 23 Nov 2026 15:56:45 +0200 [thread overview]
Message-ID: <20261123135646.3962652-4-dtatulea@nvidia.com> (raw)
In-Reply-To: <20261123135646.3962652-2-dtatulea@nvidia.com>
mlx5_vdpa has always advertised a maximum virtqueue size of 256 through
.get_vq_num_max(), while accepting any queue size in .set_vq_num(). The
hardware handles larger rings just fine and users have been running with
1024-entry queues (e.g. QEMU's virtio-net rx_queue_size/tx_queue_size)
since the driver was introduced.
The commit in the fixes tag vhost-vdpa enforces the advertised maximum
on VHOST_SET_VRING_NUM, so configuring a 1024-entry queue fails with
-EINVAL.
Advertise 1024 which is the max that qemu uses today. The device itself
supports more but doesn't advertise it in any way.
The Fixes tag points at the vhost-vdpa commit rather than at the driver
because that is where the mismatch became user visible. It also keeps
this change out of trees without the vhost enforcement, where virtio-vdpa
would otherwise start creating 1024-entry rings instead of 256.
Fixes: ccb1dc7c527f ("vhost/vdpa: reject VRING_NUM larger than device max")
Cc: stable@vger.kernel.org
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 7a39b0bbbee3..f1c5f72032a3 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2965,7 +2965,7 @@ static void mlx5_vdpa_set_config_cb(struct vdpa_device *vdev, struct vdpa_callba
ndev->config_cb = *cb;
}
-#define MLX5_VDPA_MAX_VQ_ENTRIES 256
+#define MLX5_VDPA_MAX_VQ_ENTRIES 1024
static u16 mlx5_vdpa_get_vq_num_max(struct vdpa_device *vdev)
{
return MLX5_VDPA_MAX_VQ_ENTRIES;
--
2.54.0
next prev parent reply other threads:[~2026-11-23 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 13:56 [PATCH 0/3] vdpa/mlx5: Misc fixes Dragos Tatulea
2026-11-23 13:56 ` [PATCH 1/3] vdpa/mlx5: Fix error cleanup when VQ setup fails in .dev_add Dragos Tatulea
2026-11-23 16:08 ` Eugenio Perez Martin
2026-11-23 13:56 ` Dragos Tatulea [this message]
2026-11-23 15:38 ` [PATCH 2/3] vdpa/mlx5: Increase the maximum virtqueue size Eugenio Perez Martin
2026-11-23 13:56 ` [PATCH 3/3] vdpa/mlx5: Don't flush the workqueue under reslock Dragos Tatulea
2026-11-23 15:47 ` Eugenio Perez Martin
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=20261123135646.3962652-4-dtatulea@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=eperezma@redhat.com \
--cc=gal@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
/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
all inboxes | Powered by JetHome®