aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Richard Gobert <richardbgobert@gmail.com> 2024-05-09 21:08:17 +0200
committerGravatar Jakub Kicinski <kuba@kernel.org> 2024-05-13 14:44:06 -0700
commit186b1ea73ad8f30d1d7afdb1d07dfd5b5de8f2da (patch)
tree1c53e7b199aa0dbd7217713010a364da3f1a50f6 /include
parentMerge branch 'ena-driver-changes-may-2024' (diff)
downloadlinux-186b1ea73ad8f30d1d7afdb1d07dfd5b5de8f2da.tar.gz
linux-186b1ea73ad8f30d1d7afdb1d07dfd5b5de8f2da.tar.bz2
linux-186b1ea73ad8f30d1d7afdb1d07dfd5b5de8f2da.zip
net: gro: use cb instead of skb->network_header
This patch converts references of skb->network_header to napi_gro_cb's network_offset and inner_network_offset. Signed-off-by: Richard Gobert <richardbgobert@gmail.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20240509190819.2985-2-richardbgobert@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/gro.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/net/gro.h b/include/net/gro.h
index 5df8bf318197..cbc1b0aaf295 100644
--- a/include/net/gro.h
+++ b/include/net/gro.h
@@ -181,12 +181,17 @@ static inline void *skb_gro_header(struct sk_buff *skb, unsigned int hlen,
return ptr;
}
+static inline int skb_gro_receive_network_offset(const struct sk_buff *skb)
+{
+ return NAPI_GRO_CB(skb)->network_offsets[NAPI_GRO_CB(skb)->encap_mark];
+}
+
static inline void *skb_gro_network_header(const struct sk_buff *skb)
{
if (skb_gro_may_pull(skb, skb_gro_offset(skb)))
- return skb_gro_header_fast(skb, skb_network_offset(skb));
+ return skb_gro_header_fast(skb, skb_gro_receive_network_offset(skb));
- return skb_network_header(skb);
+ return skb->data + skb_gro_receive_network_offset(skb);
}
static inline __wsum inet_gro_compute_pseudo(const struct sk_buff *skb,