diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-04-02 13:59:57 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-03 15:05:44 -0700 |
| commit | 166b0cc6df8c8bd961058aa3ed0c2d1a2bdaffca (patch) | |
| tree | eba19fd11b0ceebd1ca132614e3b4fc31408994b /tools/testing | |
| parent | 5469b695f23642611c47e31329025a21de86c629 (diff) | |
selftests: drv-net: gro: remove TOTAL_HDR_LEN
Willem points out TOTAL_HDR_LEN is identical to MAX_HDR_LEN.
This seems to have been the case ever since the test was added.
Replace the uses of TOTAL_HDR_LEN with MAX_HDR_LEN, MAX seems
more common for what this value is.
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260402210000.1512696-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/net/lib/gro.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/lib/gro.c b/tools/testing/selftests/net/lib/gro.c index 57080ecc3df8..3616ecc42a01 100644 --- a/tools/testing/selftests/net/lib/gro.c +++ b/tools/testing/selftests/net/lib/gro.c @@ -94,7 +94,6 @@ #define START_SEQ 100 #define START_ACK 100 #define ETH_P_NONE 0 -#define TOTAL_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr)) #define MSS (4096 - sizeof(struct tcphdr) - sizeof(struct ipv6hdr)) #define MAX_PAYLOAD (IP_MAXPACKET - sizeof(struct tcphdr) - sizeof(struct ipv6hdr)) #define NUM_LARGE_PKT (MAX_PAYLOAD / MSS) @@ -526,9 +525,9 @@ static void send_data_pkts(int fd, struct sockaddr_ll *daddr, */ static void send_large(int fd, struct sockaddr_ll *daddr, int remainder) { - static char pkts[NUM_LARGE_PKT][TOTAL_HDR_LEN + MSS]; - static char last[TOTAL_HDR_LEN + MSS]; - static char new_seg[TOTAL_HDR_LEN + MSS]; + static char pkts[NUM_LARGE_PKT][MAX_HDR_LEN + MSS]; + static char last[MAX_HDR_LEN + MSS]; + static char new_seg[MAX_HDR_LEN + MSS]; int i; for (i = 0; i < NUM_LARGE_PKT; i++) |
