lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGkMEtMgNpoSeUUFt10LJZqtTpi1atbPJwpXDf94AyzVKxvqQ@mail.gmail.com>
Date: Thu, 5 Feb 2026 12:12:17 +0800
From: Jason Wang <jasowang@...hat.com>
To: Vishwanath Seshagiri <vishs@...a.com>
Cc: "Michael S . Tsirkin" <mst@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, 
	Eugenio Pérez <eperezma@...hat.com>, 
	Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	David Wei <dw@...idwei.uk>, Matteo Croce <technoboy85@...il.com>, 
	Ilias Apalodimas <ilias.apalodimas@...aro.org>, netdev@...r.kernel.org, 
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	kernel-team@...a.com
Subject: Re: [PATCH net-next v4 2/2] selftests: virtio_net: add buffer
 circulation test

On Thu, Feb 5, 2026 at 3:36 AM Vishwanath Seshagiri <vishs@...a.com> wrote:
>
> Add iperf3-based test to verify RX buffer handling under load.
> Optionally logs page_pool tracepoints when available.
>
> Signed-off-by: Vishwanath Seshagiri <vishs@...a.com>
> ---
>  .../drivers/net/virtio_net/basic_features.sh  | 86 +++++++++++++++++++
>  1 file changed, 86 insertions(+)
>
> diff --git a/tools/testing/selftests/drivers/net/virtio_net/basic_features.sh b/tools/testing/selftests/drivers/net/virtio_net/basic_features.sh
> index cf8cf816ed48..fa98505c4674 100755
> --- a/tools/testing/selftests/drivers/net/virtio_net/basic_features.sh
> +++ b/tools/testing/selftests/drivers/net/virtio_net/basic_features.sh
> @@ -6,6 +6,7 @@
>  ALL_TESTS="
>         initial_ping_test
>         f_mac_test
> +       buffer_circulation_test
>  "
>
>  source virtio_net_common.sh
> @@ -16,6 +17,8 @@ source "$lib_dir"/../../../net/forwarding/lib.sh
>  h1=${NETIFS[p1]}
>  h2=${NETIFS[p2]}
>
> +IPERF_SERVER_PID=""
> +
>  h1_create()
>  {
>         simple_if_init $h1 $H1_IPV4/24 $H1_IPV6/64
> @@ -83,6 +86,84 @@ f_mac_test()
>         log_test "$test_name"
>  }
>
> +buffer_circulation_test()
> +{
> +       RET=0
> +       local test_name="buffer circulation"
> +       local tracefs="/sys/kernel/tracing"
> +
> +       if ! check_command iperf3; then
> +               log_test_skip "$test_name" "iperf3 not installed"
> +               return 0
> +       fi
> +
> +       setup_cleanup
> +       setup_prepare
> +
> +       ping -c 1 -I "$h1" "$H2_IPV4" >/dev/null
> +       if [ $? -ne 0 ]; then
> +               check_err 1 "Ping failed"
> +               log_test "$test_name"
> +               return
> +       fi
> +
> +       local rx_start=$(cat /sys/class/net/"$h2"/statistics/rx_packets)
> +       local tx_start=$(cat /sys/class/net/"$h1"/statistics/tx_packets)
> +
> +       if [ -d "$tracefs/events/page_pool" ]; then
> +               echo > "$tracefs/trace"
> +               echo 1 > "$tracefs/events/page_pool/enable"
> +       fi
> +
> +       local port=$(shuf -i 49152-65535 -n 1)
> +
> +       iperf3 -s -1 --bind-dev "$h2" -p "$port" &>/dev/null &
> +       IPERF_SERVER_PID=$!
> +       sleep 1

Nit:

It's better to use a more robust detecting instead of a sleep 1.

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ