From: Richard Gobert <richardbgobert@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
dsahern@kernel.org, willemdebruijn.kernel@gmail.com,
shuah@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb
Date: Thu, 18 Apr 2024 17:09:22 +0200 [thread overview]
Message-ID: <ae2f3e8b-7566-4ba9-ad83-31ff75fd28c6@gmail.com> (raw)
In-Reply-To: <49dafb7c4d4aef2946dac86296c29dc4c9b993d4.camel@redhat.com>
Paolo Abeni wrote:
> On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote:
>> This patch adds network_offset and inner_network_offset to napi_gro_cb, and
>> makes sure both are set correctly. In the common path there's only one
>> write (skb_gro_reset_offset).
>>
>> Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
>
> Does not apply cleanly to net-next. You have to wait until the net
> dependency is merged into net-next before posting.
>
>> ---
>> drivers/net/geneve.c | 1 +
>> drivers/net/vxlan/vxlan_core.c | 1 +
>> include/net/gro.h | 18 ++++++++++++++++--
>> net/8021q/vlan_core.c | 2 ++
>> net/core/gro.c | 1 +
>> net/ethernet/eth.c | 1 +
>> net/ipv4/af_inet.c | 5 +----
>> net/ipv4/gre_offload.c | 1 +
>> net/ipv6/ip6_offload.c | 8 ++++----
>> 9 files changed, 28 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
>> index 9c18a39b0d0c..a6256ea1f5bc 100644
>> --- a/drivers/net/geneve.c
>> +++ b/drivers/net/geneve.c
>> @@ -545,6 +545,7 @@ static struct sk_buff *geneve_gro_receive(struct sock *sk,
>> if (!ptype)
>> goto out;
>>
>> + NAPI_GRO_CB(skb)->inner_network_offset = hlen;
>> pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
>> flush = 0;
>>
>> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
>> index 6fb182d9d6e7..9fb93c3953c1 100644
>> --- a/drivers/net/vxlan/vxlan_core.c
>> +++ b/drivers/net/vxlan/vxlan_core.c
>> @@ -754,6 +754,7 @@ static struct sk_buff *vxlan_gpe_gro_receive(struct sock *sk,
>>
>> vh = vxlan_gro_prepare_receive(sk, head, skb, &grc);
>> if (vh) {
>> + NAPI_GRO_CB(skb)->inner_network_offset = skb_gro_offset(skb);
>> if (!vxlan_parse_gpe_proto(vh, &protocol))
>> goto out;
>> ptype = gro_find_receive_by_type(protocol);
>
> What about vxlan_gro_receive? and fou/gue?
>
No need to write in fou/gue functions, as both functions call
{inet,inet6}_offloads, which means if there's an IP/IPv6 header after
fou/gue - ipip_gro_receive will be called (or ip6ip6_gro_receive, or
sit_ip6ip6_gro_receive, etc), in which inner_network_offset is written.
vxlan_gro_receive calls eth_gro_receive, in which inner_network_offset
is written as well.
> Side note: the latter apparently exist mainly to make UDP-related
> changes more difficult, can we deprecated them once for all?
>
> Thank,
>
> Paolo
>
next prev parent reply other threads:[~2024-04-18 15:09 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 [this message]
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
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=ae2f3e8b-7566-4ba9-ad83-31ff75fd28c6@gmail.com \
--to=richardbgobert@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;
as well as URLs for NNTP newsgroup(s).