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=PJH0QSYP; 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 BDF155A065C for ; Mon, 15 Dec 2025 13:40:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765802420; 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: in-reply-to:in-reply-to:references:references; bh=jcfwWbDCxRTPLgqqTQiY21MHeiI17ZkDYNs37gtqYzY=; b=PJH0QSYP1B7VP4n2HKOJ8LB6U7RKTsdovLP+Ul3WVMC2L+hUxZo6PQlmt4VdmhdkWrAvhO BVSR7wEfdYqky6OaNHoNFFV2AhV7HBszCua3eL1Q7Gip1qp9QAaylXzygrawfg5/8Ajd+z m9OWubXEqzaMDd09qVPYt4acXbpHnOk= 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-481-omtUUvcHNZWICiWcDkQb0Q-1; Mon, 15 Dec 2025 07:40:17 -0500 X-MC-Unique: omtUUvcHNZWICiWcDkQb0Q-1 X-Mimecast-MFC-AGG-ID: omtUUvcHNZWICiWcDkQb0Q_1765802416 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 0F82F195608D; Mon, 15 Dec 2025 12:40:16 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.44.34.89]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0193180045B; Mon, 15 Dec 2025 12:40:14 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v4 3/6] test: Add multiqueue support to vhost-user test infrastructure Date: Mon, 15 Dec 2025 13:40:04 +0100 Message-ID: <20251215124007.1549660-4-lvivier@redhat.com> In-Reply-To: <20251215124007.1549660-1-lvivier@redhat.com> References: <20251215124007.1549660-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: KIn_9JyW2nSTeAUI2oOncB0Ah62Xab8hTwTpLMHIcPU_1765802416 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: HNEYAIBRXLPLBCPVRAOL7YOGRO6YYTAN X-Message-ID-Hash: HNEYAIBRXLPLBCPVRAOL7YOGRO6YYTAN 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 , David Gibson 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: With the recent addition of multiqueue support to passt's vhost-user implementation, we need test coverage to validate the functionality. The test infrastructure previously only tested single queue configurations. Add a VHOST_USER_MQ environment variable to control the number of queue pairs. The queues parameter on the netdev is always set to this value (defaulting to 1 for single queue). When set to values greater than 1, the setup scripts add mq=true to the virtio-net device for enabling multiqueue support. The test suite now runs an additional set of tests with 8 queue pairs to exercise the multiqueue paths across all protocols (TCP, UDP, ICMP) and services (DHCP, NDP). Note that the guest kernel will only enable as many queues as there are vCPUs. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson --- test/lib/setup | 21 +++++++++++++-------- test/run | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/test/lib/setup b/test/lib/setup index 5994598744a3..3872a02b109b 100755 --- a/test/lib/setup +++ b/test/lib/setup @@ -18,6 +18,8 @@ VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )" MEM_KIB="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)" QEMU_ARCH="$(uname -m)" [ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386 +VHOST_USER=0 +VHOST_USER_MQ=1 # setup_build() - Set up pane layout for build tests setup_build() { @@ -46,6 +48,7 @@ setup_passt() { [ ${DEBUG} -eq 1 ] && __opts="${__opts} -d" [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace" [ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" + [ ${VHOST_USER_MQ} -gt 1 ] && __virtio_opts="${__virtio_opts},mq=true" context_run passt "make clean" context_run passt "make valgrind" @@ -59,8 +62,8 @@ setup_passt() { __vmem="$(((${__vmem} + 500) / 1000))G" __qemu_netdev=" \ -chardev socket,id=c,path=${STATESETUP}/passt.socket \ - -netdev vhost-user,id=v,chardev=c \ - -device virtio-net,netdev=v \ + -netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ} \ + -device virtio-net,netdev=v${__virtio_opts} \ -object memory-backend-memfd,id=m,share=on,size=${__vmem} \ -numa node,memdev=m" else @@ -156,6 +159,7 @@ setup_passt_in_ns() { [ ${DEBUG} -eq 1 ] && __opts="${__opts} -d" [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace" [ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" + [ ${VHOST_USER_MQ} -gt 1 ] && __virtio_opts="${__virtio_opts},mq=true" if [ ${VALGRIND} -eq 1 ]; then context_run passt "make clean" @@ -173,8 +177,8 @@ setup_passt_in_ns() { __vmem="$(((${__vmem} + 500) / 1000))G" __qemu_netdev=" \ -chardev socket,id=c,path=${STATESETUP}/passt.socket \ - -netdev vhost-user,id=v,chardev=c \ - -device virtio-net,netdev=v \ + -netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ} \ + -device virtio-net,netdev=v${__virtio_opts} \ -object memory-backend-memfd,id=m,share=on,size=${__vmem} \ -numa node,memdev=m" else @@ -251,6 +255,7 @@ setup_two_guests() { [ ${DEBUG} -eq 1 ] && __opts="${__opts} -d" [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace" [ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" + [ ${VHOST_USER_MQ} -gt 1 ] && __virtio_opts="${__virtio_opts},mq=true" context_run_bg passt_2 "./passt -s ${STATESETUP}/passt_2.socket -P ${STATESETUP}/passt_2.pid -f ${__opts} --hostname hostname2 --fqdn fqdn2 -t 10004 -u 10004" wait_for [ -f "${STATESETUP}/passt_2.pid" ] @@ -260,14 +265,14 @@ setup_two_guests() { __vmem="$(((${__vmem} + 500) / 1000))G" __qemu_netdev1=" \ -chardev socket,id=c,path=${STATESETUP}/passt_1.socket \ - -netdev vhost-user,id=v,chardev=c \ - -device virtio-net,netdev=v \ + -netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ} \ + -device virtio-net,netdev=v${__virtio_opts} \ -object memory-backend-memfd,id=m,share=on,size=${__vmem} \ -numa node,memdev=m" __qemu_netdev2=" \ -chardev socket,id=c,path=${STATESETUP}/passt_2.socket \ - -netdev vhost-user,id=v,chardev=c \ - -device virtio-net,netdev=v \ + -netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ} \ + -device virtio-net,netdev=v${__virtio_opts} \ -object memory-backend-memfd,id=m,share=on,size=${__vmem} \ -numa node,memdev=m" else diff --git a/test/run b/test/run index f858e5586847..652cc12b1234 100755 --- a/test/run +++ b/test/run @@ -190,6 +190,29 @@ run() { test passt_vu_in_ns/shutdown teardown passt_in_ns + VHOST_USER=1 + VHOST_USER_MQ=8 + setup passt_in_ns + test passt_vu/ndp + test passt_vu_in_ns/dhcp + test passt_vu_in_ns/icmp + test passt_vu_in_ns/tcp + test passt_vu_in_ns/udp + test passt_vu_in_ns/shutdown + teardown passt_in_ns + + setup two_guests + test two_guests_vu/basic + teardown two_guests + + setup passt_in_ns + test passt_vu/ndp + test passt_vu_in_ns/dhcp + test perf/passt_vu_tcp + test perf/passt_vu_udp + test passt_vu_in_ns/shutdown + teardown passt_in_ns + # TODO: Make those faster by at least pre-installing gcc and make on # non-x86 images, then re-enable. skip_distro() { -- 2.51.1