]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: drv-net: gro: make large packet math more precise
authorJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 20:59:58 +0000 (13:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Apr 2026 22:05:44 +0000 (15:05 -0700)
commit024597cc2077e36dc69327e46fa6dfb1cd0885cd
treec886e705374df7febee2528339aba0afce4dd760
parent166b0cc6df8c8bd961058aa3ed0c2d1a2bdaffca
selftests: drv-net: gro: make large packet math more precise

When constructing the packets for large_* test cases we use
a static value for packet count and MSS. It works okay for
ipv4 vs ipv6 but the gap between ipv4 and ip6ip6 is going to
be quite significant.

Make the defines calculate the worst case values, those
are only used for sizing stack arrays. Create helpers for
calculating precise values based on the exact test case.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260402210000.1512696-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib/gro.c