public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/6] vhost-user: Add multiqueue support
@ 2025-11-21 16:58 Laurent Vivier
  2025-11-21 16:58 ` [PATCH v2 1/6] tap: Remove pool parameter from tap4_handler() and tap6_handler() Laurent Vivier
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Laurent Vivier @ 2025-11-21 16:58 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

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.

This series adds:
- configuration support for multiqueue via --max-queues parameter
- one packet pool per queue pair instead of shared pools
- 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
- test coverage with VHOST_USER_MQ environment variable to validate multiqueue
  functionality across all protocols (TCP, UDP, ICMP) and services (DHCP, NDP)

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.

v2:
- New patch: "tap: Remove pool parameter from tap4_handler() and tap6_handler()"
  to clean up unused parameters before adding queue pair parameter
- Changed to one packet pool per queue pair instead of shared pools across
  all queue pairs
- Split "multiqueue: Add queue-aware flow management..." into two patches:
  - "tap: Add queue pair parameter throughout the packet processing path"
  - "flow: Add queue pair tracking to flow management"
- Updated test infrastructure patch with refined implementation

Laurent Vivier (6):
  tap: Remove pool parameter from tap4_handler() and tap6_handler()
  vhost-user: Enable multiqueue
  vhost-user: Add queue pair parameter throughout the network stack
  tap: Add queue pair parameter throughout the packet processing path
  flow: Add queue pair tracking to flow management
  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         |  30 +++++++++
 flow.h         |  17 +++++
 fwd.c          |   4 +-
 icmp.c         |  25 ++++---
 icmp.h         |   2 +-
 ndp.c          |  32 +++++----
 ndp.h          |   5 +-
 passt.h        |   2 +
 tap.c          | 173 +++++++++++++++++++++++++++++--------------------
 tap.h          |  20 +++---
 tcp.c          |  66 +++++++++++--------
 tcp.h          |  11 ++--
 tcp_vu.c       |   8 ++-
 test/lib/setup |  58 +++++++++++++----
 test/run       |  23 +++++++
 udp.c          |  39 ++++++-----
 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    |  15 +++--
 vu_common.h    |   3 +-
 31 files changed, 443 insertions(+), 224 deletions(-)

-- 
2.51.0



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-11-28  1:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-21 16:58 [PATCH v2 0/6] vhost-user: Add multiqueue support Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 1/6] tap: Remove pool parameter from tap4_handler() and tap6_handler() Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 2/6] vhost-user: Enable multiqueue Laurent Vivier
2025-11-26  2:20   ` David Gibson
2025-11-26  8:04     ` Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 3/6] vhost-user: Add queue pair parameter throughout the network stack Laurent Vivier
2025-11-26  2:35   ` David Gibson
2025-11-21 16:59 ` [PATCH v2 4/6] tap: Add queue pair parameter throughout the packet processing path Laurent Vivier
2025-11-26  3:16   ` David Gibson
2025-11-21 16:59 ` [PATCH v2 5/6] flow: Add queue pair tracking to flow management Laurent Vivier
2025-11-26  3:41   ` David Gibson
2025-11-27  9:17     ` Laurent Vivier
2025-11-28  0:53       ` David Gibson
2025-11-21 16:59 ` [PATCH v2 6/6] test: Add multiqueue support to vhost-user test infrastructure Laurent Vivier
2025-11-26  3:45   ` David Gibson
2025-11-27  9:20     ` Laurent Vivier
2025-11-28  0:54       ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).