[F/G/H/Unstable][F/oem-5.6][SRU][PATCH 0/1] selftests: fix poll error in udpgro.sh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[F/G/H/Unstable][F/oem-5.6][SRU][PATCH 0/1] selftests: fix poll error in udpgro.sh

Po-Hsu Lin (Sam)
[Impact]
Sub test cases in kselftest/net/udpgro.sh is failing with:
    ./udpgso_bench_rx: poll: 0x0 expected 0x1

Complete test output of a sub test case:
 multiple GRO socks
BTF debug data section '.BTF' rejected: Invalid argument (22)!
 - Length: 568
Verifier analysis:

magic: 0xeb9f
version: 1
flags: 0x0
hdr_len: 24
type_off: 0
type_len: 256
str_off: 256
str_len: 288
btf_total_size: 568
[1] PTR (anon) type_id=2
[2] STRUCT xdp_md size=20 vlen=5
 data type_id=3 bits_offset=0
 data_end type_id=3 bits_offset=32
 data_meta type_id=3 bits_offset=64
 ingress_ifindex type_id=3 bits_offset=96
 rx_queue_index type_id=3 bits_offset=128
[3] TYPEDEF __u32 type_id=4
[4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none)
[5] FUNC_PROTO (anon) return=6 args=(1 ctx)
[6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
[7] FUNC xdp_dummy_prog type_id=5
[8] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED
[9] ARRAY (anon) type_id=8 index_type_id=10 nr_elems=4
[10] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none)
[11] VAR _license type_id=9 linkage=1
[12] DATASEC license size=0 vlen=1 size == 0

./udpgso_bench_rx: poll: 0x0 expected 0x1

./udpgso_bench_rx: poll: 0x0 expected 0x1

failed

It's a bit hard to spot this as the udpgro.sh will return 0 even with
these failures present (bug 1908499)

[Fix]
* 38bf8cd821be29 ("selftests: fix poll error in udpgro.sh")

We have this test case since Focal.
This patch can be cherry-picked into all the affected releases.

[Test Case]
Run the kselftest/net/udpgro.sh as root.

It will no longer complaining about this error message anymore:
 ./udpgso_bench_rx: poll: 0x0 expected 0x1

 multiple GRO socks
BTF debug data section '.BTF' rejected: Invalid argument (22)!
 - Length: 568
Verifier analysis:

magic: 0xeb9f
version: 1
flags: 0x0
hdr_len: 24
type_off: 0
type_len: 256
str_off: 256
str_len: 288
btf_total_size: 568
[1] PTR (anon) type_id=2
[2] STRUCT xdp_md size=20 vlen=5
 data type_id=3 bits_offset=0
 data_end type_id=3 bits_offset=32
 data_meta type_id=3 bits_offset=64
 ingress_ifindex type_id=3 bits_offset=96
 rx_queue_index type_id=3 bits_offset=128
[3] TYPEDEF __u32 type_id=4
[4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none)
[5] FUNC_PROTO (anon) return=6 args=(1 ctx)
[6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
[7] FUNC xdp_dummy_prog type_id=5
[8] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED
[9] ARRAY (anon) type_id=8 index_type_id=10 nr_elems=4
[10] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none)
[11] VAR _license type_id=9 linkage=1
[12] DATASEC license size=0 vlen=1 size == 0

ok

[Where problems could occur]
The fix is limited to testing tools, no actual affect to the kernel.
The possible issue is that this patch is incorrect and it will make
us ignore the real issue in the kernel.

Paolo Abeni (1):
  selftests: fix poll error in udpgro.sh

 tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[F/G/H/Unstable][F/oem-5.6][SRU][PATCH 1/1] selftests: fix poll error in udpgro.sh

Po-Hsu Lin (Sam)
From: Paolo Abeni <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1908501

The test program udpgso_bench_rx always invokes the poll()
syscall with a timeout of 10ms. If a larger timeout is specified
via the command line, udpgso_bench_rx is supposed to do multiple
poll() calls till the timeout is expired or an event is received.

Currently the poll() loop errors out after the first invocation with
no events, and may causes self-tests failure alike:

failed
 GRO with custom segment size            ./udpgso_bench_rx: poll: 0x0 expected 0x1

This change addresses the issue allowing the poll() loop to consume
all the configured timeout.

Fixes: ada641ff6ed3 ("selftests: fixes for UDP GRO")
Signed-off-by: Paolo Abeni <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 38bf8cd821be292e7d8e6f6283d67c5d9708f887)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c
index db3d4a8..76a2405 100644
--- a/tools/testing/selftests/net/udpgso_bench_rx.c
+++ b/tools/testing/selftests/net/udpgso_bench_rx.c
@@ -113,6 +113,9 @@ static void do_poll(int fd, int timeout_ms)
  interrupted = true;
  break;
  }
+
+ /* no events and more time to wait, do poll again */
+ continue;
  }
  if (pfd.revents != POLLIN)
  error(1, errno, "poll: 0x%x expected 0x%x\n",
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/APPLIED[OEM-5.6]: [F/G/H/Unstable][F/oem-5.6][SRU][PATCH 1/1] selftests: fix poll error in udpgro.sh

AceLan Kao
applied to oem-5.6, thanks
Acked-By: AceLan Kao <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [F/G/H/Unstable][F/oem-5.6][SRU][PATCH 1/1] selftests: fix poll error in udpgro.sh

Stefan Bader-2
In reply to this post by Po-Hsu Lin (Sam)
On 17.12.20 10:39, Po-Hsu Lin wrote:

> From: Paolo Abeni <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1908501
>
> The test program udpgso_bench_rx always invokes the poll()
> syscall with a timeout of 10ms. If a larger timeout is specified
> via the command line, udpgso_bench_rx is supposed to do multiple
> poll() calls till the timeout is expired or an event is received.
>
> Currently the poll() loop errors out after the first invocation with
> no events, and may causes self-tests failure alike:
>
> failed
>  GRO with custom segment size            ./udpgso_bench_rx: poll: 0x0 expected 0x1
>
> This change addresses the issue allowing the poll() loop to consume
> all the configured timeout.
>
> Fixes: ada641ff6ed3 ("selftests: fixes for UDP GRO")
> Signed-off-by: Paolo Abeni <[hidden email]>
> Signed-off-by: David S. Miller <[hidden email]>
> (cherry picked from commit 38bf8cd821be292e7d8e6f6283d67c5d9708f887)
> Signed-off-by: Po-Hsu Lin <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c
> index db3d4a8..76a2405 100644
> --- a/tools/testing/selftests/net/udpgso_bench_rx.c
> +++ b/tools/testing/selftests/net/udpgso_bench_rx.c
> @@ -113,6 +113,9 @@ static void do_poll(int fd, int timeout_ms)
>   interrupted = true;
>   break;
>   }
> +
> + /* no events and more time to wait, do poll again */
> + continue;
>   }
>   if (pfd.revents != POLLIN)
>   error(1, errno, "poll: 0x%x expected 0x%x\n",
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[F/G]: [F/G/H/Unstable][F/oem-5.6][SRU][PATCH 0/1] selftests: fix poll error in udpgro.sh

Kelsey Skunberg
In reply to this post by Po-Hsu Lin (Sam)
These were applied to F/G through an upstream patch. Thank you!

-Kelsey

On 2020-12-17 17:39:28 , Po-Hsu Lin wrote:

> [Impact]
> Sub test cases in kselftest/net/udpgro.sh is failing with:
>     ./udpgso_bench_rx: poll: 0x0 expected 0x1
>
> Complete test output of a sub test case:
>  multiple GRO socks
> BTF debug data section '.BTF' rejected: Invalid argument (22)!
>  - Length: 568
> Verifier analysis:
>
> magic: 0xeb9f
> version: 1
> flags: 0x0
> hdr_len: 24
> type_off: 0
> type_len: 256
> str_off: 256
> str_len: 288
> btf_total_size: 568
> [1] PTR (anon) type_id=2
> [2] STRUCT xdp_md size=20 vlen=5
>  data type_id=3 bits_offset=0
>  data_end type_id=3 bits_offset=32
>  data_meta type_id=3 bits_offset=64
>  ingress_ifindex type_id=3 bits_offset=96
>  rx_queue_index type_id=3 bits_offset=128
> [3] TYPEDEF __u32 type_id=4
> [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [5] FUNC_PROTO (anon) return=6 args=(1 ctx)
> [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
> [7] FUNC xdp_dummy_prog type_id=5
> [8] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED
> [9] ARRAY (anon) type_id=8 index_type_id=10 nr_elems=4
> [10] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [11] VAR _license type_id=9 linkage=1
> [12] DATASEC license size=0 vlen=1 size == 0
>
> ./udpgso_bench_rx: poll: 0x0 expected 0x1
>
> ./udpgso_bench_rx: poll: 0x0 expected 0x1
>
> failed
>
> It's a bit hard to spot this as the udpgro.sh will return 0 even with
> these failures present (bug 1908499)
>
> [Fix]
> * 38bf8cd821be29 ("selftests: fix poll error in udpgro.sh")
>
> We have this test case since Focal.
> This patch can be cherry-picked into all the affected releases.
>
> [Test Case]
> Run the kselftest/net/udpgro.sh as root.
>
> It will no longer complaining about this error message anymore:
>  ./udpgso_bench_rx: poll: 0x0 expected 0x1
>
>  multiple GRO socks
> BTF debug data section '.BTF' rejected: Invalid argument (22)!
>  - Length: 568
> Verifier analysis:
>
> magic: 0xeb9f
> version: 1
> flags: 0x0
> hdr_len: 24
> type_off: 0
> type_len: 256
> str_off: 256
> str_len: 288
> btf_total_size: 568
> [1] PTR (anon) type_id=2
> [2] STRUCT xdp_md size=20 vlen=5
>  data type_id=3 bits_offset=0
>  data_end type_id=3 bits_offset=32
>  data_meta type_id=3 bits_offset=64
>  ingress_ifindex type_id=3 bits_offset=96
>  rx_queue_index type_id=3 bits_offset=128
> [3] TYPEDEF __u32 type_id=4
> [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [5] FUNC_PROTO (anon) return=6 args=(1 ctx)
> [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
> [7] FUNC xdp_dummy_prog type_id=5
> [8] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED
> [9] ARRAY (anon) type_id=8 index_type_id=10 nr_elems=4
> [10] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [11] VAR _license type_id=9 linkage=1
> [12] DATASEC license size=0 vlen=1 size == 0
>
> ok
>
> [Where problems could occur]
> The fix is limited to testing tools, no actual affect to the kernel.
> The possible issue is that this patch is incorrect and it will make
> us ignore the real issue in the kernel.
>
> Paolo Abeni (1):
>   selftests: fix poll error in udpgro.sh
>
>  tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team