On 12/5/24 10:43, Eelco Chaudron wrote:


On 4 Dec 2024, at 10:29, Maxime Coquelin wrote:

This patch uses the new rte_vhost_driver_set_max_queue_num
API to set the maximum number of queue pairs supported by
the Vhost-user port.

This is required for VDUSE which needs to specify the
maximum number of queue pairs at creation time. Without it
128 queue pairs metadata would be allocated.

To configure it, a new 'vhost-queue-pairs-max' option is
introduced.

Signed-off-by: Maxime Coquelin <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
---

I only code-reviewed this patch (no actual testing) and I have some comments 
below.

Changes in v3:
==============
- Introduce a new option to set the number of max queue pairs (Kevin)
- Add documentation for new option

Changes in v2:
==============
- Address checkpatch warnings.
---
  Documentation/topics/dpdk/vhost-user.rst | 15 +++++++++++++
  lib/netdev-dpdk.c                        | 27 ++++++++++++++++++++++++
  2 files changed, 42 insertions(+)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 7bba08ac2..5c3f1046f 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst

We also need to add the definition to the vswitch.xml file.

Ok, will do in next revision.

@@ -375,6 +375,21 @@ Tx retries max can be set for vhost-user-client ports::

    Configurable vhost tx retries are not supported with vhost-user ports.

+vhost-user-client max queue pairs config
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For vhost-user-client interfaces using the VDUSE backend, the maximum umber of
+queue pairs the Virtio device will support can be set at port creation time. If
+not set, the default value is 1 queue pair. As of DPDK v24.11, this value is
+ignored for Vhost-user backends.

I think we should not reference a DPDK version here. We should just state that 
this value is ignored for non-VDUSE backends.

Ack.

+
+Maximum number of queue pairs can be set for vhost-user-client-ports::
+
+    $ ovs-vsctl add-port br0 vduse0 \
+        -- set Interface vduse0 type=dpdkvhostuserclient \
+            options:vhost-server-path=/dev/vduse/vduse0 \
+            options:vhost-queue-pairs-max=4

The order in the naming looks odd, what about vhost-max-queue-pairs? If you 
agree also all defines and code variables should change.

Sure, I can change. I used this order to be consistent with
"tx-retries-max", but I am fine with changing it.


Thanks for the review,
Maxime

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to