hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/net/ipv4/tcp_offload.c
....@@ -1,15 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IPV4 GSO/GRO offload support
34 * Linux INET implementation
45 *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * as published by the Free Software Foundation; either version
8
- * 2 of the License, or (at your option) any later version.
9
- *
106 * TCPv4 GSO/GRO support
117 */
128
9
+#include <linux/indirect_call_wrapper.h>
1310 #include <linux/skbuff.h>
1411 #include <net/tcp.h>
1512 #include <net/protocol.h>
....@@ -301,11 +298,15 @@
301298 if (th->cwr)
302299 skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
303300
301
+ if (skb->encapsulation)
302
+ skb->inner_transport_header = skb->transport_header;
303
+
304304 return 0;
305305 }
306306 EXPORT_SYMBOL(tcp_gro_complete);
307307
308
-static struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)
308
+INDIRECT_CALLABLE_SCOPE
309
+struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)
309310 {
310311 /* Don't bother verifying checksum if we're going to flush anyway. */
311312 if (!NAPI_GRO_CB(skb)->flush &&
....@@ -318,7 +319,7 @@
318319 return tcp_gro_receive(head, skb);
319320 }
320321
321
-static int tcp4_gro_complete(struct sk_buff *skb, int thoff)
322
+INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
322323 {
323324 const struct iphdr *iph = ip_hdr(skb);
324325 struct tcphdr *th = tcp_hdr(skb);