]> git.baikalelectronics.ru Git - kernel.git/commit
net: gro: skb_gro_header helper function
authorRichard Gobert <richardbgobert@gmail.com>
Tue, 23 Aug 2022 07:10:49 +0000 (09:10 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 25 Aug 2022 08:33:21 +0000 (10:33 +0200)
commitf2aa5af2cf0984f3475250b4eae04969bb174e75
tree3574eb3f37289369144d96eaf0efb2eae226e989
parentabcb6f98a74a30e591df50514724faf6c31486ae
net: gro: skb_gro_header helper function

Introduce a simple helper function to replace a common pattern.
When accessing the GRO header, we fetch the pointer from frag0,
then test its validity and fetch it from the skb when necessary.

This leads to the pattern
skb_gro_header_fast -> skb_gro_header_hard -> skb_gro_header_slow
recurring many times throughout GRO code.

This patch replaces these patterns with a single inlined function
call, improving code readability.

Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220823071034.GA56142@debian
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/geneve.c
drivers/net/vxlan/vxlan_core.c
include/net/gro.h
net/8021q/vlan_core.c
net/ethernet/eth.c
net/ipv4/af_inet.c
net/ipv4/fou.c
net/ipv4/gre_offload.c
net/ipv4/tcp_offload.c
net/ipv6/ip6_offload.c