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=hqF3QpRy; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id B49905A0BB9 for ; Fri, 07 Nov 2025 15:39:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762526348; 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=ZrOLm/ozLQamOR2cDeoWXEaS0RvXvHyYG2fQ+7cpveA=; b=hqF3QpRyoB+oLFOAOw94Fph0+HJRE4wxFNKh1UfPZDB5kMp/FMtsIcm9apo/+mq3v95aGo 0Dgix0IU8gVTdKaI7XBTOfEPfGoUkGXmwL84hUIREyBC+gaRo4e3EhJsfpkHk9/kmefxTn LJ8bP/FN9aYe9DAtdZqKH90o81ieQMU= 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-363-AkvNdhqRNFOeNrIfjbDolA-1; Fri, 07 Nov 2025 09:39:05 -0500 X-MC-Unique: AkvNdhqRNFOeNrIfjbDolA-1 X-Mimecast-MFC-AGG-ID: AkvNdhqRNFOeNrIfjbDolA_1762526344 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 481371959BC3 for ; Fri, 7 Nov 2025 14:39:04 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.224.223]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D5E81800876; Fri, 7 Nov 2025 14:39:02 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 0/4] vhost-user: Add multiqueue support Date: Fri, 7 Nov 2025 15:38:57 +0100 Message-ID: <20251107143901.89955-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: 15UUxGpgzLQCmo2_JevI6F2dDYbopi4OIOzwwa-5fnY_1762526344 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OQN4DIEPVK46YAXUN6YO7XNJ7VXFB3O2 X-Message-ID-Hash: OQN4DIEPVK46YAXUN6YO7XNJ7VXFB3O2 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 - 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 - comprehensive test coverage with VHOST_USER_MQ environment variable to=0D validate multiqueue functionality across all test scenarios=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 Laurent Vivier (4):=0D vhost-user: Enable multiqueue=0D vhost-user: Add queue parameter throughout the network stack=0D multiqueue: Add queue-aware flow management for multiqueue support=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 | 32 +++++++++++++=0D flow.h | 10 +++++=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 | 120 +++++++++++++++++++++++++++++--------------------=0D tap.h | 18 ++++----=0D tcp.c | 82 ++++++++++++++++++---------------=0D tcp.h | 11 ++---=0D tcp_vu.c | 8 ++--=0D test/lib/setup | 60 +++++++++++++++++++------=0D test/run | 23 ++++++++++=0D udp.c | 40 ++++++++++-------=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 | 13 +++---=0D vu_common.h | 3 +-=0D 31 files changed, 416 insertions(+), 208 deletions(-)=0D =0D --=20=0D 2.51.0=0D =0D