selftests/net: fix GRO coalesce test and add ext header coalesce tests
authorRichard Gobert <richardbgobert@gmail.com>
Wed, 3 Jan 2024 14:48:35 +0000 (15:48 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Jan 2024 16:11:50 +0000 (08:11 -0800)
commit4e321d590cec6053cb3c566413794706035ee638
treebdad465b4946bdfeb4c621b20e1a41aee9f686e2
parentdff0b0161ad571f888d37f5e7163a07dcafdef60
selftests/net: fix GRO coalesce test and add ext header coalesce tests

Currently there is no test which checks that IPv6 extension header packets
successfully coalesce. This commit adds a test, which verifies two IPv6
packets with HBH extension headers do coalesce, and another test which
checks that packets with different extension header data do not coalesce
in GRO.

I changed the receive socket filter to accept a packet with one extension
header. This change exposed a bug in the fragment test -- the old BPF did
not accept the fragment packet. I updated correct_num_packets in the
fragment test accordingly.

Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/69282fed-2415-47e8-b3d3-34939ec3eb56@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/gro.c