On Fri, Nov 07, 2025 at 03:38:57PM +0100, Laurent Vivier wrote: > This series implements multiqueue support for vhost-user mode, allowing passt > to utilize multiple queue pairs. There is no improved network performance because > we keep using only one thread. > > The implementation introduces a --max-queues parameter to configure up to 16 > queue pairs (32 virtqueues) in vhost-user mode. Packets are routed to the > appropriate RX queue based on which TX queue they originated from, enabling the > guest kernel to distribute network traffic across multiple queues > and vCPUs. I find this description a little bit confusing, since at the packet (L2) level things going to an Rx queue don't really have an originating Tx queue. I assume you mean that each flow gets associated to a single queue pair, so both Rx and Tx packets on that flow will use the same queue pair (and, later, thread). Is that correct? If so I think it would be clearer to explicitly describe this in terms of flows. > This series adds: > - configuration support for multiqueue via --max-queues parameter > - queue parameter threading throughout the network stack - a significant > refactoring that propagates queue information through all protocol handlers > (TCP, UDP, ICMP, ARP, DHCP, DHCPv6, NDP) > - flow-aware queue routing that matches RX queue selection to the incoming > TX queue, maintaining proper packet affinity > - comprehensive test coverage with VHOST_USER_MQ environment variable to > validate multiqueue functionality across all test scenarios > > Current behavior: TX queue selection is controlled by the guest kernel, while > RX packets are routed to queues based on their associated flows. Host-initiated > flows currently default to queue 0. > > The RX queue of a flow is updated on each new packet from the TX queue to > maintain affinity. > > The changes maintain backward compatibility - without --max-queues, behavior > remains unchanged with single-queue operation. > > Laurent Vivier (4): > vhost-user: Enable multiqueue > vhost-user: Add queue parameter throughout the network stack > multiqueue: Add queue-aware flow management for multiqueue support > test: Add multiqueue support to vhost-user test infrastructure > > arp.c | 12 ++--- > arp.h | 4 +- > conf.c | 31 ++++++++++++- > dhcp.c | 5 ++- > dhcp.h | 2 +- > dhcpv6.c | 12 ++--- > dhcpv6.h | 2 +- > flow.c | 32 +++++++++++++ > flow.h | 10 +++++ > fwd.c | 4 +- > icmp.c | 25 ++++++----- > icmp.h | 2 +- > ndp.c | 32 +++++++------ > ndp.h | 5 ++- > passt.h | 2 + > tap.c | 120 +++++++++++++++++++++++++++++-------------------- > tap.h | 18 ++++---- > tcp.c | 82 ++++++++++++++++++--------------- > tcp.h | 11 ++--- > tcp_vu.c | 8 ++-- > test/lib/setup | 60 +++++++++++++++++++------ > test/run | 23 ++++++++++ > udp.c | 40 ++++++++++------- > udp.h | 12 ++--- > udp_flow.c | 8 +++- > udp_flow.h | 2 +- > udp_vu.c | 4 +- > vhost_user.c | 38 +++++++++------- > virtio.h | 2 +- > vu_common.c | 13 +++--- > vu_common.h | 3 +- > 31 files changed, 416 insertions(+), 208 deletions(-) > > -- > 2.51.0 > > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson