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 v3 3/6] test: Add multiqueue support to vhost-user test infrastructure
Date: Wed, 10 Dec 2025 11:05:13 +1100	[thread overview]
Message-ID: <aTi5OW4P_1nqslT2@zatzit> (raw)
In-Reply-To: <20251203185435.582096-4-lvivier@redhat.com>

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

On Wed, Dec 03, 2025 at 07:54:31PM +0100, Laurent Vivier wrote:
> 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 <lvivier@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  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
> 

-- 
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-12-10  0:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 18:54 [PATCH v3 0/6] vhost-user: Add multiqueue support Laurent Vivier
2025-12-03 18:54 ` [PATCH v3 1/6] tap: Remove pool parameter from tap4_handler() and tap6_handler() Laurent Vivier
2025-12-05  4:14   ` David Gibson
2025-12-03 18:54 ` [PATCH v3 2/6] vhost-user: Enable multiqueue Laurent Vivier
2025-12-10  0:04   ` David Gibson
2025-12-11  7:01   ` Stefano Brivio
2025-12-11  8:29     ` Laurent Vivier
2025-12-03 18:54 ` [PATCH v3 3/6] test: Add multiqueue support to vhost-user test infrastructure Laurent Vivier
2025-12-10  0:05   ` David Gibson [this message]
2025-12-03 18:54 ` [PATCH v3 4/6] vhost-user: Add queue pair parameter throughout the network stack Laurent Vivier
2025-12-11  7:01   ` Stefano Brivio
2025-12-11  8:48     ` Laurent Vivier
2025-12-11 12:16       ` Stefano Brivio
2025-12-11 13:26         ` Laurent Vivier
2025-12-11 15:27           ` Stefano Brivio
2025-12-11 16:06             ` Laurent Vivier
2025-12-03 18:54 ` [PATCH v3 5/6] tap: Convert packet pools to per-queue-pair arrays for multiqueue Laurent Vivier
2025-12-03 18:54 ` [PATCH v3 6/6] flow: Add queue pair tracking to flow management Laurent Vivier

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=aTi5OW4P_1nqslT2@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).