public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Gobert <richardbgobert@gmail.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, willemdebruijn.kernel@gmail.com,
	dsahern@kernel.org, alexander.duyck@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: [PATCH net-next v10 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4
Date: Thu,  9 May 2024 21:08:16 +0200	[thread overview]
Message-ID: <20240509190819.2985-1-richardbgobert@gmail.com> (raw)

The cb fields network_offset and inner_network_offset are used instead of
skb->network_header throughout GRO.

These fields are then leveraged in the next commit to remove flush_id state
from napi_gro_cb, and stateful code in {ipv6,inet}_gro_receive which may be
unnecessarily complicated due to encapsulation support in GRO. These fields
are checked in L4 instead.

3rd patch adds tests for different flush_id flows in GRO.

v9 -> v10:
 - rebased on latest net-next
 - improved code readability in inet_gro_flush
 - v9:
   https://lore.kernel.org/all/20240507162349.130277-1-richardbgobert@gmail.com/

v8 -> v9:
 - rename skb_gro_network_offset to skb_gro_receive_network_offset for
   clarification
 - improved code readability
 - v8:
   https://lore.kernel.org/all/20240412155533.115507-1-richardbgobert@gmail.com/

v7 -> v8:
 - Remove network_header use in gro
 - Re-send commits after the dependent patch to net was applied
 - v7:
   https://lore.kernel.org/all/20240412155533.115507-1-richardbgobert@gmail.com/

v6 -> v7:
 - Moved bug fixes to a separate submission in net
 - Added UDP fwd benchmark
 - v6:
   https://lore.kernel.org/all/20240410153423.107381-1-richardbgobert@gmail.com/

v5 -> v6:
 - Write inner_network_offset in vxlan and geneve
 - Ignore is_atomic when DF=0
 - v5:
   https://lore.kernel.org/all/20240408141720.98832-1-richardbgobert@gmail.com/

v4 -> v5:
 - Add 1st commit - flush id checks in udp_gro_receive segment which can be
   backported by itself
 - Add TCP measurements for the 5th commit
 - Add flush id tests to ensure flush id logic is preserved in GRO
 - Simplify gro_inet_flush by removing a branch
 - v4:
   https://lore.kernel.org/all/202420325182543.87683-1-richardbgobert@gmail.com/

v3 -> v4:
 - Fix code comment and commit message typos
 - v3:
   https://lore.kernel.org/all/f939c84a-2322-4393-a5b0-9b1e0be8ed8e@gmail.com/

v2 -> v3:
 - Use napi_gro_cb instead of skb->{offset}
 - v2:
   https://lore.kernel.org/all/2ce1600b-e733-448b-91ac-9d0ae2b866a4@gmail.com/

v1 -> v2:
 - Pass p_off in *_gro_complete to fix UDP bug
 - Remove more conditionals and memory fetches from inet_gro_flush
 - v1:
   https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-64248480338b@gmail.com/

Richard Gobert (3):
  net: gro: use cb instead of skb->network_header
  net: gro: move L3 flush checks to tcp_gro_receive and
    udp_gro_receive_segment
  selftests/net: add flush id selftests

 include/net/gro.h                 |  85 +++++++++++++++---
 net/core/gro.c                    |   3 -
 net/ipv4/af_inet.c                |  45 +---------
 net/ipv4/tcp_offload.c            |  20 ++---
 net/ipv4/udp_offload.c            |   9 +-
 net/ipv6/ip6_offload.c            |  16 +---
 net/ipv6/tcpv6_offload.c          |   3 +-
 tools/testing/selftests/net/gro.c | 138 ++++++++++++++++++++++++++++++
 8 files changed, 224 insertions(+), 95 deletions(-)

-- 
2.36.1


             reply	other threads:[~2024-05-09 19:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 19:08 Richard Gobert [this message]
2024-05-09 19:08 ` [PATCH net-next v10 1/3] net: gro: use cb instead of skb->network_header Richard Gobert
2024-05-13  0:43   ` Willem de Bruijn
2024-05-09 19:08 ` [PATCH net-next v10 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment Richard Gobert
2024-05-13  0:43   ` Willem de Bruijn
2024-05-14 12:13   ` Geert Uytterhoeven
2024-05-14 14:14     ` Jakub Kicinski
2024-05-14 15:56       ` Richard Gobert
2024-05-14 16:06         ` Jakub Kicinski
2024-05-14 17:06           ` [PATCH] net: gro: fix napi_gro_cb zeroed alignment Richard Gobert
2024-05-14 18:00             ` patchwork-bot+netdevbpf
2024-05-09 19:08 ` [PATCH net-next v10 3/3] selftests/net: add flush id selftests Richard Gobert
2024-05-13  0:44   ` Willem de Bruijn
2024-05-13 21:50 ` [PATCH net-next v10 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4 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=20240509190819.2985-1-richardbgobert@gmail.com \
    --to=richardbgobert@gmail.com \
    --cc=alexander.duyck@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=shuah@kernel.org \
    --cc=willemdebruijn.kernel@gmail.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