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=FXweH10b; 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 1CF125A0271 for ; Fri, 21 Nov 2025 17:59:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763744349; 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=J8CiaWOtzZWULNM2xHfr1Hbg3N86tU4OAzRdXKPZcIs=; b=FXweH10be8kUMGtJKmV/Z9DSK3ldc16zLJpYZc7TkuZ503KSKlHeiqBBWBkhREkdZUHhUa Lb2ON2sQlncTUHj4PFmwYH7Tg+kK8y5idnFgOw/0mF1H1YhMfXu1YNwkuhUAcZVI372mul YK8kag15XDdcCp7TAUWrUcxvfDq8isE= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-p1IshKEoNdSsMYUHs1mLNg-1; Fri, 21 Nov 2025 11:59:07 -0500 X-MC-Unique: p1IshKEoNdSsMYUHs1mLNg-1 X-Mimecast-MFC-AGG-ID: p1IshKEoNdSsMYUHs1mLNg_1763744346 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 076FD1956073 for ; Fri, 21 Nov 2025 16:59:05 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.225.111]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 090661940E88; Fri, 21 Nov 2025 16:59:03 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v2 0/6] vhost-user: Add multiqueue support Date: Fri, 21 Nov 2025 17:58:56 +0100 Message-ID: <20251121165902.1014964-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: v4Fb_9sl_9xOj1CTaTxNJJEZ6Qdx_rwKZRN16SKzO6c_1763744346 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TZVBEGW6GS53IXJGJMI5O77GAZRZNVR5 X-Message-ID-Hash: TZVBEGW6GS53IXJGJMI5O77GAZRZNVR5 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. There is no improved network performance b= ecause=0D we keep using only one thread.=0D =0D The implementation introduces a --max-queues parameter to configure up to 1= 6=0D queue pairs (32 virtqueues) in vhost-user mode. Packets are routed to the= =0D appropriate RX queue based on which TX queue they originated from, enabling= the=0D guest kernel to distribute network traffic across multiple queues and vCPUs= .=0D =0D This series adds:=0D - configuration support for multiqueue via --max-queues parameter=0D - one packet pool per queue pair instead of shared pools=0D - queue parameter threading throughout the network stack - a significant=0D refactoring that propagates queue information through all protocol handle= rs=0D (TCP, UDP, ICMP, ARP, DHCP, DHCPv6, NDP)=0D - flow-aware queue routing that matches RX queue selection to the incoming= =0D TX queue, maintaining proper packet affinity=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: TX queue selection is controlled by the guest kernel, whi= le=0D RX packets are routed to queues based on their associated flows. Host-initi= ated=0D flows currently default to queue 0.=0D =0D The RX queue of a flow is updated on each new packet from the TX queue to= =0D maintain affinity.=0D =0D The changes maintain backward compatibility - without --max-queues, behavio= r=0D remains unchanged with single-queue operation.=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 vhost-user: Add queue pair parameter throughout the network stack=0D tap: Add queue pair parameter throughout the packet processing path=0D flow: Add queue pair tracking to flow management=0D test: Add multiqueue support to vhost-user test infrastructure=0D =0D arp.c | 12 ++--=0D arp.h | 4 +-=0D conf.c | 31 ++++++++-=0D dhcp.c | 5 +-=0D dhcp.h | 2 +-=0D dhcpv6.c | 12 ++--=0D dhcpv6.h | 2 +-=0D flow.c | 30 +++++++++=0D flow.h | 17 +++++=0D fwd.c | 4 +-=0D icmp.c | 25 ++++---=0D icmp.h | 2 +-=0D ndp.c | 32 +++++----=0D ndp.h | 5 +-=0D passt.h | 2 +=0D tap.c | 173 +++++++++++++++++++++++++++++--------------------=0D tap.h | 20 +++---=0D tcp.c | 66 +++++++++++--------=0D tcp.h | 11 ++--=0D tcp_vu.c | 8 ++-=0D test/lib/setup | 58 +++++++++++++----=0D test/run | 23 +++++++=0D udp.c | 39 ++++++-----=0D udp.h | 12 ++--=0D udp_flow.c | 8 ++-=0D udp_flow.h | 2 +-=0D udp_vu.c | 4 +-=0D vhost_user.c | 38 ++++++-----=0D virtio.h | 2 +-=0D vu_common.c | 15 +++--=0D vu_common.h | 3 +-=0D 31 files changed, 443 insertions(+), 224 deletions(-)=0D =0D --=20=0D 2.51.0=0D =0D