patch 'vhost: fix log when setting max queue num' has been queued to stable release 23.11.4
Xueming Li
xuemingl at nvidia.com
Tue Feb 18 13:33:59 CET 2025
Hi,
FYI, your patch has been queued to stable release 23.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
Please shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e099c1e17e8dda291975db45ef6298a6c87e84cc
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From e099c1e17e8dda291975db45ef6298a6c87e84cc Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Thu, 9 Jan 2025 15:31:30 +0100
Subject: [PATCH] vhost: fix log when setting max queue num
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 274292190d1384b028552adc601dda4b197f2417 ]
rte_vhost_driver_set_max_queue_num API returns early when
called for a Vhost-user device, as this API is intended to
limit the maximum number of queue pairs supported by VDUSE
devices. However, a log mentioning the maximum number of
queue pairs is being set is emitted unconditionally, which
may confuse the end user.
This patch moves this log after the backend type is
checked, so that it is only called with VDUSE backends.
The check on the requested value is also moved at the same
place.
Fixes: e1808999d36b ("vhost: restrict set max queue pair API to VDUSE")
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Reviewed-by: Ilya Maximets <i.maximets at ovn.org>
Reviewed-by: Chenbo Xia <chenbox at nvidia.com>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
---
lib/vhost/socket.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index ffb8518e74..6cf76eb7ae 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -849,14 +849,6 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
struct vhost_user_socket *vsocket;
int ret = 0;
- VHOST_LOG_CONFIG(path, INFO, "Setting max queue pairs to %u\n", max_queue_pairs);
-
- if (max_queue_pairs > VHOST_MAX_QUEUE_PAIRS) {
- VHOST_LOG_CONFIG(path, ERR, "Library only supports up to %u queue pairs\n",
- VHOST_MAX_QUEUE_PAIRS);
- return -1;
- }
-
pthread_mutex_lock(&vhost_user.mutex);
vsocket = find_vhost_user_socket(path);
if (!vsocket) {
@@ -876,6 +868,15 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
goto unlock_exit;
}
+ VHOST_LOG_CONFIG(path, INFO, "Setting max queue pairs to %u", max_queue_pairs);
+
+ if (max_queue_pairs > VHOST_MAX_QUEUE_PAIRS) {
+ VHOST_LOG_CONFIG(path, ERR, "Library only supports up to %u queue pairs",
+ VHOST_MAX_QUEUE_PAIRS);
+ ret = -1;
+ goto unlock_exit;
+ }
+
vsocket->max_queue_pairs = max_queue_pairs;
unlock_exit:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-18 19:39:00.901479401 +0800
+++ 0004-vhost-fix-log-when-setting-max-queue-num.patch 2025-02-18 19:39:00.398244087 +0800
@@ -1 +1 @@
-From 274292190d1384b028552adc601dda4b197f2417 Mon Sep 17 00:00:00 2001
+From e099c1e17e8dda291975db45ef6298a6c87e84cc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 274292190d1384b028552adc601dda4b197f2417 ]
@@ -19 +21,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index d29d15494c..05a7e5902f 100644
+index ffb8518e74..6cf76eb7ae 100644
@@ -33 +35 @@
-@@ -844,14 +844,6 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
+@@ -849,14 +849,6 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
@@ -37 +39 @@
-- VHOST_CONFIG_LOG(path, INFO, "Setting max queue pairs to %u", max_queue_pairs);
+- VHOST_LOG_CONFIG(path, INFO, "Setting max queue pairs to %u\n", max_queue_pairs);
@@ -40 +42 @@
-- VHOST_CONFIG_LOG(path, ERR, "Library only supports up to %u queue pairs",
+- VHOST_LOG_CONFIG(path, ERR, "Library only supports up to %u queue pairs\n",
@@ -48 +50 @@
-@@ -872,6 +864,15 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
+@@ -876,6 +868,15 @@ rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
@@ -52 +54 @@
-+ VHOST_CONFIG_LOG(path, INFO, "Setting max queue pairs to %u", max_queue_pairs);
++ VHOST_LOG_CONFIG(path, INFO, "Setting max queue pairs to %u", max_queue_pairs);
@@ -55 +57 @@
-+ VHOST_CONFIG_LOG(path, ERR, "Library only supports up to %u queue pairs",
++ VHOST_LOG_CONFIG(path, ERR, "Library only supports up to %u queue pairs",
More information about the stable
mailing list