From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TCRrTfVI; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 800555A0276 for ; Wed, 03 Dec 2025 19:54:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764788080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m1JAVyInWsl4kqCCZ0DSPRTMhjbuKnWr2loflomk3lg=; b=TCRrTfVISYz/McSKxU5wFdYLQ9ddrX+hGlHotTvA0tCOp+YqNv1w40CURr2mlGmjT1UXzN EeF4JcOnwp7Ek8iho7rVlnHXgPH5llao1qUQumBthI6RR/tFIPkyRy65YwbBjUuy7NUdjf ci38qHew3GHya9EDnu5G2aTc4CUskwM= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-224-26WIKbO2NK2YQomrgwQBhA-1; Wed, 03 Dec 2025 13:54:38 -0500 X-MC-Unique: 26WIKbO2NK2YQomrgwQBhA-1 X-Mimecast-MFC-AGG-ID: 26WIKbO2NK2YQomrgwQBhA_1764788078 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 05B741800245 for ; Wed, 3 Dec 2025 18:54:38 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.225.59]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E613B180035A; Wed, 3 Dec 2025 18:54:36 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v3 0/6] vhost-user: Add multiqueue support Date: Wed, 3 Dec 2025 19:54:28 +0100 Message-ID: <20251203185435.582096-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 52rgi04x8lyCpHo5CY7PurRAea8LtlZTSOKZUzWxB4Y_1764788078 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QE7M5RQ2WCSB3IKFLZJ2CTEM7DHDECEA X-Message-ID-Hash: QE7M5RQ2WCSB3IKFLZJ2CTEM7DHDECEA X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This series implements multiqueue support for vhost-user mode, allowing pas= st=0D to utilize multiple queue pairs for improved network throughput when used w= ith=0D multi-CPU guest VMs. While this version uses a single thread for packet=0D processing, it enables the guest kernel to distribute network traffic acros= s=0D multiple queues and vCPUs.=0D =0D The implementation advertises support for up to 16 queue pairs (32 virtqueu= es)=0D by setting VIRTIO_NET_F_MQ and VHOST_USER_PROTOCOL_F_MQ feature flags.=0D Packets are routed to the appropriate RX queue based on which TX queue they= =0D originated from, following the virtio specification's automatic receive=0D steering requirements.=0D =0D This series adds:=0D - Multiqueue capability advertisement (VIRTIO_NET_F_MQ and=0D VHOST_USER_PROTOCOL_F_MQ features)=0D - Per-queue-pair packet pools to support concurrent queue operations=0D - Queue pair parameter throughout the network stack, propagated through all= =0D protocol handlers (TCP, UDP, ICMP, ARP, DHCP, DHCPv6, NDP)=0D - Flow-aware queue routing that tracks the originating TX queue for each fl= ow=0D and routes return packets to the corresponding RX queue=0D - Test coverage with VHOST_USER_MQ environment variable to validate multiqu= eue=0D functionality across all protocols (TCP, UDP, ICMP) and services (DHCP, N= DP)=0D =0D Current behavior:=0D - TX queue selection is controlled by the guest kernel's networking stack= =0D - RX packets are routed to queues based on their associated flows, with the= =0D queue assignment updated on each packet from TX to maintain affinity=0D - Host-initiated flows (e.g., from socket-side connections) currently defau= lt=0D to queue pair 0=0D =0D The changes are transparent to single-queue operation - passt/pasta modes a= nd=0D single-queue vhost-user configurations continue to work unchanged, always= =0D using queue pair 0.=0D =0D v3:=0D - Removed --max-qpairs configuration option - multiqueue support is now=0D always enabled up to 16 queue pairs without requiring explicit configurat= ion=0D - Replaced "tap: Add queue pair parameter throughout the packet processing= =0D path" with "tap: Convert packet pools to per-queue-pair arrays for=0D multiqueue" - simplified implementation by converting global pools to arr= ays=0D rather than passing pool parameters throughout=0D - Changed qpair parameter type from int to unsigned int throughout the code= base=0D - Simplified test infrastructure - queues parameter is always set on netdev= ,=0D mq=3Dtrue added to virtio-net only when VHOST_USER_MQ > 1=0D - Updated QEMU usage hints to always show multiqueue-capable command line= =0D =0D v2:=0D - New patch: "tap: Remove pool parameter from tap4_handler() and tap6_handl= er()"=0D to clean up unused parameters before adding queue pair parameter=0D - Changed to one packet pool per queue pair instead of shared pools across= =0D all queue pairs=0D - Split "multiqueue: Add queue-aware flow management..." into two patches:= =0D - "tap: Add queue pair parameter throughout the packet processing path"= =0D - "flow: Add queue pair tracking to flow management"=0D - Updated test infrastructure patch with refined implementation=0D =0D Laurent Vivier (6):=0D tap: Remove pool parameter from tap4_handler() and tap6_handler()=0D vhost-user: Enable multiqueue=0D test: Add multiqueue support to vhost-user test infrastructure=0D vhost-user: Add queue pair parameter throughout the network stack=0D tap: Convert packet pools to per-queue-pair arrays for multiqueue=0D flow: Add queue pair tracking to flow management=0D =0D arp.c | 15 +++--=0D arp.h | 6 +-=0D dhcp.c | 5 +-=0D dhcp.h | 2 +-=0D dhcpv6.c | 12 ++--=0D dhcpv6.h | 2 +-=0D flow.c | 33 +++++++++=0D flow.h | 17 +++++=0D fwd.c | 18 ++---=0D fwd.h | 5 +-=0D icmp.c | 25 ++++---=0D icmp.h | 4 +-=0D ndp.c | 35 ++++++----=0D ndp.h | 7 +-=0D netlink.c | 2 +-=0D tap.c | 177 ++++++++++++++++++++++++++++---------------------=0D tap.h | 20 +++---=0D tcp.c | 47 +++++++------=0D tcp.h | 7 +-=0D tcp_vu.c | 8 ++-=0D test/lib/setup | 21 +++---=0D test/run | 23 +++++++=0D udp.c | 47 +++++++------=0D udp.h | 6 +-=0D udp_flow.c | 8 ++-=0D udp_flow.h | 2 +-=0D udp_internal.h | 4 +-=0D udp_vu.c | 4 +-=0D vhost_user.c | 10 +--=0D virtio.h | 2 +-=0D vu_common.c | 15 +++--=0D vu_common.h | 3 +-=0D 32 files changed, 374 insertions(+), 218 deletions(-)=0D =0D --=20=0D 2.51.1=0D =0D