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=FDJLTwHl; 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 D4D325A0271 for ; Fri, 05 Sep 2025 17:49:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757087379; 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=yr8W8/RefkvHSNrLBM57b2+UF/Qe6uQKfIdN1Q3qVyY=; b=FDJLTwHll3itxe9efsifhE+S7z4K+73HpPRjSUjBF3a5NyrDjgo6WFpZmbrQz8b03VQQF3 P7B7FKJ34LUdl01fL4WM2kRYlWM8SfQ7y5g8btSoJX1YcazPWXLUykbDgsTnVtnDlGqunn cZrqdt+96BdEzG6PXDsQmkkBP1OdrNg= Received: from mx-prod-mc-05.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-382-7CeQvGn7MkGlJlN7ZZFiPw-1; Fri, 05 Sep 2025 11:49:38 -0400 X-MC-Unique: 7CeQvGn7MkGlJlN7ZZFiPw-1 X-Mimecast-MFC-AGG-ID: 7CeQvGn7MkGlJlN7ZZFiPw_1757087377 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8646019560B2 for ; Fri, 5 Sep 2025 15:49:37 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.44.32.9]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F7C3180035E; Fri, 5 Sep 2025 15:49:36 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 0/3] This series contains fixes and improvements to the vhost-user implementation Date: Fri, 5 Sep 2025 17:49:32 +0200 Message-ID: <20250905154935.389634-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tTM_VxrUlx5OeNJINcQAyuw7JYE_Po0-dgkAVnFi7tw_1757087377 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TELNTANM3DP4ODQBWPYQGST3CTT4UGPZ X-Message-ID-Hash: TELNTANM3DP4ODQBWPYQGST3CTT4UGPZ 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: =0D The first patch fixes a protocol compliance issue where VHOST_USER_GET_QUEU= E_NUM=0D was incorrectly returning the number of virtqueues instead of queue pairs. = The=0D vhost-user specification clearly states this should return the maximum numb= er=0D of queues supported by the backend. Since each queue consists of an RX/TX p= air,=0D the correct value is VHOST_USER_MAX_VQS / 2. This patch also renames the=0D constant to better reflect its meaning.=0D =0D The second and third patches address virtqueue handling in the UDP and TCP= =0D receive paths. These changes pass the virtqueue pointer explicitly to the= =0D receive functions, enabling proper queue selection for future multiqueue=0D support. This ensures packets are processed on the same virtqueue as the=0D caller.=0D =0D These changes lay the groundwork for full multiqueue support while fixing= =0D existing protocol compliance issues.=0D =0D Laurent Vivier (3):=0D vhost-user: Fix VHOST_USER_GET_QUEUE_NUM to return number of queues=0D udp_vu: Pass virtqueue pointer to udp_vu_sock_recv()=0D tcp_vu: Pass virtqueue pointer to tcp_vu_sock_recv()=0D =0D tcp_vu.c | 8 ++++----=0D udp_vu.c | 9 +++++----=0D vhost_user.c | 16 +++++++++-------=0D virtio.h | 4 ++--=0D 4 files changed, 20 insertions(+), 17 deletions(-)=0D =0D --=20=0D 2.50.1=0D =0D