netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Richard Gobert <richardbgobert@gmail.com>,
	 davem@davemloft.net,  edumazet@google.com,  kuba@kernel.org,
	 pabeni@redhat.com,  dsahern@kernel.org,
	 willemdebruijn.kernel@gmail.com,  shuah@kernel.org,
	 netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org
Cc: Richard Gobert <richardbgobert@gmail.com>
Subject: Re: [PATCH net-next v7 3/3] selftests/net: add flush id selftests
Date: Sat, 13 Apr 2024 20:55:57 -0400	[thread overview]
Message-ID: <661b299dbed73_3cb63829464@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240412155533.115507-4-richardbgobert@gmail.com>

Richard Gobert wrote:
> Added flush id selftests to test different cases where DF flag is set or
> unset and id value changes in the following packets. All cases where the
> packets should coalesce or should not coalesce are tested.
> 
> Signed-off-by: Richard Gobert <richardbgobert@gmail.com>

Thanks for adding tests. Minor point below only. The tests pass both
before and after your series, right? Then immediately a nice
validation that the optimization has no unintended side-effects.

> ---
>  tools/testing/selftests/net/gro.c | 144 ++++++++++++++++++++++++++++++
>  1 file changed, 144 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/gro.c b/tools/testing/selftests/net/gro.c
> index 353e1e867fbb..74ab06953c38 100644
> --- a/tools/testing/selftests/net/gro.c
> +++ b/tools/testing/selftests/net/gro.c
> @@ -617,6 +617,120 @@ static void add_ipv6_exthdr(void *buf, void *optpkt, __u8 exthdr_type, char *ext
>  	iph->payload_len = htons(ntohs(iph->payload_len) + MIN_EXTHDR_SIZE);
>  }
>  
> +static void fix_ip4_checksum(struct iphdr *iph)
> +{
> +	iph->check = 0;
> +	iph->check = checksum_fold(iph, sizeof(struct iphdr), 0);
> +}
> +
> +static void send_flush_id_case(int fd, struct sockaddr_ll *daddr, int tcase)
> +{
> +	bool send_three = false;
> +	static char buf1[MAX_HDR_LEN + PAYLOAD_LEN];
> +	static char buf2[MAX_HDR_LEN + PAYLOAD_LEN];
> +	static char buf3[MAX_HDR_LEN + PAYLOAD_LEN];
> +
> +	create_packet(buf1, 0, 0, PAYLOAD_LEN, 0);
> +	create_packet(buf2, PAYLOAD_LEN, 0, PAYLOAD_LEN, 0);
> +	create_packet(buf3, PAYLOAD_LEN * 2, 0, PAYLOAD_LEN, 0);
> +
> +	struct iphdr *iph1 = (struct iphdr *)(buf1 + ETH_HLEN);
> +	struct iphdr *iph2 = (struct iphdr *)(buf2 + ETH_HLEN);
> +	struct iphdr *iph3 = (struct iphdr *)(buf3 + ETH_HLEN);
> +

minor: variable defintions before code, and reverse chrismas tree.

  reply	other threads:[~2024-04-14  0:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 15:55 [PATCH net-next v7 0/3] net: gro: move p->{flush/flush_id} calculations to L4 Richard Gobert
2024-04-12 15:55 ` [PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb Richard Gobert
2024-04-14  1:15   ` Willem de Bruijn
2024-04-17 13:57     ` Richard Gobert
2024-04-16  9:36   ` Paolo Abeni
2024-04-18 15:09     ` Richard Gobert
2024-04-12 15:55 ` [PATCH net-next v7 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment Richard Gobert
2024-04-16  9:21   ` Paolo Abeni
2024-04-16  9:58     ` Paolo Abeni
2024-04-18 15:05       ` Richard Gobert
2024-04-12 15:55 ` [PATCH net-next v7 3/3] selftests/net: add flush id selftests Richard Gobert
2024-04-14  0:55   ` Willem de Bruijn [this message]
2024-04-17 14:01     ` Richard Gobert

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=661b299dbed73_3cb63829464@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardbgobert@gmail.com \
    --cc=shuah@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).