public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 4/4] test: Add multiqueue support to vhost-user test infrastructure
Date: Mon, 10 Nov 2025 16:57:32 +1100	[thread overview]
Message-ID: <aRF-zLNSYIpXI3N7@zatzit> (raw)
In-Reply-To: <20251107143901.89955-5-lvivier@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 8521 bytes --]

On Fri, Nov 07, 2025 at 03:39:01PM +0100, Laurent Vivier wrote:
> Extend test suite to support multiqueue testing with vhost-user
> backend. This change:
> 
> - Adds VHOST_USER_MQ environment variable to control queue count
> - Passes --max-queues parameter to passt when VHOST_USER_MQ > 1
> - Configures QEMU with queues= parameter for vhost-user netdev
> - Updates setup scripts for passt, passt_in_ns, and two_guests setups
> - Adds new test runs with 8 queues for comprehensive multiqueue testing.

This is a good start, but it's definitely not "comprehensive" (our
existing testsuite is also far from comprehensive).  That's not Claude
putting words in your mouth, is it?

>   Note that the guest kernel will not enable more queues than the number
>   of vCPUs.
> 
> The test infrastructure now validates multiqueue functionality across
> all test scenarios including TCP, UDP, ICMP, DHCP, NDP, and performance
> tests.
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  test/lib/setup | 60 ++++++++++++++++++++++++++++++++++++++------------
>  test/run       | 23 +++++++++++++++++++
>  2 files changed, 69 insertions(+), 14 deletions(-)
> 
> diff --git a/test/lib/setup b/test/lib/setup
> index 5994598744a3..69433aa89adc 100755
> --- a/test/lib/setup
> +++ b/test/lib/setup
> @@ -45,7 +45,8 @@ setup_passt() {
>  	[ ${PCAP} -eq 1 ] && __opts="${__opts} -p ${LOGDIR}/passt.pcap"
>  	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
>  	[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
> -	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user"
> +	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" && \
> +	[ ${VHOST_USER_MQ} -gt 1 ] && __opts="${__opts} --max-queues ${VHOST_USER_MQ}"
>  
>  	context_run passt "make clean"
>  	context_run passt "make valgrind"
> @@ -59,10 +60,18 @@ 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			       \
>  			-object memory-backend-memfd,id=m,share=on,size=${__vmem} \
>  			-numa node,memdev=m"
> +
> +		if [ ${VHOST_USER_MQ} -qt 1 ]; then
> +			__qemu_netdev="${__qemu_netdev}			       \
> +			-device virtio-net,netdev=v,mq=true		       \
> +			-netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ}"
> +		else
> +			__qemu_netdev="${__qemu_netdev}			       \
> +			-device virtio-net,netdev=v			       \
> +			-netdev vhost-user,id=v,chardev=c"
> +		fi
>  	else
>  		__qemu_netdev="-device virtio-net-pci,netdev=s		       \
>  			-netdev stream,id=s,server=off,addr.type=unix,addr.path=${STATESETUP}/passt.socket"
> @@ -155,7 +164,8 @@ setup_passt_in_ns() {
>  	[ ${PCAP} -eq 1 ] && __opts="${__opts} -p ${LOGDIR}/passt_in_pasta.pcap"
>  	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
>  	[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
> -	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user"
> +	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" && \
> +	[ ${VHOST_USER_MQ} -gt 1 ] && __opts="${__opts} --max-queues ${VHOST_USER_MQ}"
>  
>  	if [ ${VALGRIND} -eq 1 ]; then
>  		context_run passt "make clean"
> @@ -173,10 +183,18 @@ 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			       \
>  			-object memory-backend-memfd,id=m,share=on,size=${__vmem} \
>  			-numa node,memdev=m"
> +
> +		if [ ${VHOST_USER_MQ} -qt 1 ]; then
> +			__qemu_netdev="${__qemu_netdev}			       \
> +			-device virtio-net,netdev=v,mq=true		       \
> +			-netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ}"
> +		else
> +			__qemu_netdev="${__qemu_netdev}			       \
> +			-device virtio-net,netdev=v			       \
> +			-netdev vhost-user,id=v,chardev=c"
> +		fi
>  	else
>  		__qemu_netdev="-device virtio-net-pci,netdev=s		       \
>  			-netdev stream,id=s,server=off,addr.type=unix,addr.path=${STATESETUP}/passt.socket"
> @@ -241,18 +259,20 @@ setup_two_guests() {
>  	[ ${PCAP} -eq 1 ] && __opts="${__opts} -p ${LOGDIR}/passt_1.pcap"
>  	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
>  	[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
> -	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user"
> +	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" && \
> +	[ ${VHOST_USER_MQ} -gt 1 ] && __opts="${__opts} --max-queues ${VHOST_USER_MQ}"
>  
> -	context_run_bg passt_1 "./passt -s ${STATESETUP}/passt_1.socket -P ${STATESETUP}/passt_1.pid -f ${__opts} --fqdn fqdn1.passt.test -H hostname1 -t 10001 -u 10001"
> +	context_run_bg passt_1 "./passt -s ${STATESETUP}/passt_1.socket -P ${STATESETUP}/passt_1.pid -f ${__opts} --fqdn fqdn1.passt.test -H hostname1 -t 10001 -u 10001 ${__passt_mq}"
>  	wait_for [ -f "${STATESETUP}/passt_1.pid" ]
>  
>  	__opts=
>  	[ ${PCAP} -eq 1 ] && __opts="${__opts} -p ${LOGDIR}/passt_2.pcap"
>  	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
>  	[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
> -	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user"
> +	[ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" && \
> +	[ ${VHOST_USER_MQ} -gt 1 ] && __opts="${__opts} --max-queues ${VHOST_USER_MQ}"
>  
> -	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"
> +	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 ${__passt_mq}"
>  	wait_for [ -f "${STATESETUP}/passt_2.pid" ]
>  
>  	__vmem="$((${MEM_KIB} / 1024 / 4))"
> @@ -260,16 +280,28 @@ 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			       \
>  			-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			       \
>  			-object memory-backend-memfd,id=m,share=on,size=${__vmem} \
>  			-numa node,memdev=m"
> +
> +		if [ ${VHOST_USER_MQ} -qt 1 ]; then
> +			__qemu_netdev1="${__qemu_netdev1}		       \
> +			-device virtio-net,netdev=v,mq=true		       \
> +			-netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ}"
> +			__qemu_netdev2="${__qemu_netdev2}		       \
> +			-device virtio-net,netdev=v,mq=true		       \
> +			-netdev vhost-user,id=v,chardev=c,queues=${VHOST_USER_MQ}"
> +		else
> +			__qemu_netdev1="${__qemu_netdev1}		       \
> +			-device virtio-net,netdev=v			       \
> +			-netdev vhost-user,id=v,chardev=c"
> +			__qemu_netdev2="${__qemu_netdev2}		       \
> +			-device virtio-net,netdev=v			       \
> +			-netdev vhost-user,id=v,chardev=c"
> +		fi
>  	else
>  		__qemu_netdev1="-device virtio-net-pci,netdev=s		       \
>  			-netdev stream,id=s,server=off,addr.type=unix,addr.path=${STATESETUP}/passt_1.socket"
> 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.0
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-11-10  5:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 14:38 [PATCH 0/4] vhost-user: Add multiqueue support Laurent Vivier
2025-11-07 14:38 ` [PATCH 1/4] vhost-user: Enable multiqueue Laurent Vivier
2025-11-10  4:48   ` David Gibson
2025-11-17 15:26     ` Laurent Vivier
2025-11-18  0:16       ` David Gibson
2025-11-07 14:38 ` [PATCH 2/4] vhost-user: Add queue parameter throughout the network stack Laurent Vivier
2025-11-10  5:19   ` David Gibson
2025-11-07 14:39 ` [PATCH 3/4] multiqueue: Add queue-aware flow management for multiqueue support Laurent Vivier
2025-11-10  5:54   ` David Gibson
2025-11-07 14:39 ` [PATCH 4/4] test: Add multiqueue support to vhost-user test infrastructure Laurent Vivier
2025-11-10  5:57   ` David Gibson [this message]
2025-11-10  4:40 ` [PATCH 0/4] vhost-user: Add multiqueue support David Gibson
2025-11-10  6:00   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aRF-zLNSYIpXI3N7@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).