netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <yang.yang29@zte.com.cn>
To: <davem@davemloft.net>, <willemdebruijn.kernel@gmail.com>,
	<edumazet@google.com>
Cc: <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<shuah@kernel.org>, <netdev@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next 0/3] selftests: net: udpgso_bench_rx: Fix verifty, gsosize, and packet number exceptions
Date: Mon, 17 Apr 2023 20:17:35 +0800 (CST)	[thread overview]
Message-ID: <202304172017351308785@zte.com.cn> (raw)

From: zhang yunkai (CGEL ZTE) <zhang.yunkai@zte.com.cn>

1.Fix verifty exception
Executing the following command fails:
bash# udpgso_bench_tx -l 4 -4 -D "$DST"
bash# udpgso_bench_tx -l 4 -4 -D "$DST" -S 0
bash# udpgso_bench_rx -4 -G -S 1472 -v
udpgso_bench_rx: data[1472]: len 2944, a(97) != q(113)

This is because the sending buffers are not aligned by 26 bytes, and the
GRO is not merged sequentially, and the receiver does not judge this
situation. We think of the receiver to split the data and then validate
it, just as the application actually uses this feature.

2.Fix gsosize exception
Executing the following command fails:
bash# udpgso_bench_tx -l 4 -4 -D "$DST"
bash# udpgso_bench_tx -l 4 -4 -D "$DST" -S 0
bash# udpgso_bench_rx -4 -G -S 1472
udp rx:     15 MB/s      256 calls/s
udp rx:     30 MB/s      512 calls/s
udpgso_bench_rx: recv: bad gso size, got -1, expected 1472
(-1 == no gso cmsg))

 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 7360
 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 1472
 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 1472
 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 4416
 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 11776
 IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 20608
recv: got one message len:1472, probably not an error.
recv: got one message len:1472, probably not an error.

This is due to network, NAPI, timer, etc., only one message being received.
We believe that this situation should be normal.

3.Fix packet number exception
bash# udpgso_bench_rx -4 -n 100
bash# udpgso_bench_tx -l 1 -4 -D "$DST"
udpgso_bench_rx: wrong packet number! got 0, expected 100

This is because the packets is cleared after print.

Zhang Yunkai (3):
  selftests: net: udpgso_bench_rx: Fix verifty exceptions
  selftests: net: udpgso_bench_rx: Fix gsosize exceptions
  selftests: net: udpgso_bench_rx: Fix packet number exceptions

 tools/testing/selftests/net/udpgso_bench_rx.c | 45 +++++++++++++++++++++------
 1 file changed, 35 insertions(+), 10 deletions(-)

--
2.15.2

             reply	other threads:[~2023-04-17 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 12:17 yang.yang29 [this message]
2023-04-17 12:24 ` [PATCH linux-next 1/3] selftests: net: udpgso_bench_rx: Fix verifty exceptions Yang Yang
2023-04-17 15:16   ` Willem de Bruijn
2023-04-18  1:29     ` Yang Yang
2023-04-18 13:01       ` Willem de Bruijn
2023-04-18 14:20   ` Paolo Abeni
2023-04-17 12:24 ` [PATCH linux-next 2/3] selftests: net: udpgso_bench_rx: Fix gsosize exceptions Yang Yang
2023-04-17 12:25 ` [PATCH linux-next 3/3] selftests: net: udpgso_bench_rx: Fix packet number exceptions Yang Yang
2023-04-17 15:27   ` Willem de Bruijn

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=202304172017351308785@zte.com.cn \
    --to=yang.yang29@zte.com.cn \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    /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.
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 NNTP newsgroup(s).