public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, shuah@kernel.org,
	willemb@google.com, petrm@nvidia.com, anubhavsinggh@google.com,
	richardbgobert@gmail.com, linux-kselftest@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next v2 5/8] selftests: drv-net: gro: remove TOTAL_HDR_LEN
Date: Thu,  2 Apr 2026 13:59:57 -0700	[thread overview]
Message-ID: <20260402210000.1512696-6-kuba@kernel.org> (raw)
In-Reply-To: <20260402210000.1512696-1-kuba@kernel.org>

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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 tools/testing/selftests/net/lib/gro.c | 7 +++----
 1 file 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++)
-- 
2.53.0


  parent reply	other threads:[~2026-04-02 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 20:59 [PATCH net-next v2 0/8] selftests: drv-net: gro: more test cases Jakub Kicinski
2026-04-02 20:59 ` [PATCH net-next v2 1/8] selftests: drv-net: gro: add data burst test case Jakub Kicinski
2026-04-02 20:59 ` [PATCH net-next v2 2/8] selftests: drv-net: gro: add 1 byte payload test Jakub Kicinski
2026-04-02 20:59 ` [PATCH net-next v2 3/8] selftests: drv-net: gro: always wait for FIN in the capacity test Jakub Kicinski
2026-04-02 20:59 ` [PATCH net-next v2 4/8] selftests: drv-net: gro: prepare for ip6ip6 support Jakub Kicinski
2026-04-02 20:59 ` Jakub Kicinski [this message]
2026-04-02 20:59 ` [PATCH net-next v2 6/8] selftests: drv-net: gro: make large packet math more precise Jakub Kicinski
2026-04-02 20:59 ` [PATCH net-next v2 7/8] selftests: drv-net: gro: test ip6ip6 Jakub Kicinski
2026-04-02 21:00 ` [PATCH net-next v2 8/8] selftests: drv-net: gro: add a test for bad IPv4 csum Jakub Kicinski
2026-04-02 21:37 ` [PATCH net-next v2 0/8] selftests: drv-net: gro: more test cases Willem de Bruijn
2026-04-03 23:10 ` patchwork-bot+netdevbpf

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=20260402210000.1512696-6-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anubhavsinggh@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=richardbgobert@gmail.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.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