From: Jesse Gross <jesse@kernel.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Patrick Boutilier <boutilpj@ednet.ns.ca>,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH net v2 1/3] ipip: Properly mark ipip GRO packets as encapsulated.
Date: Sat, 19 Mar 2016 09:32:00 -0700 [thread overview]
Message-ID: <1458405122-12565-2-git-send-email-jesse@kernel.org> (raw)
In-Reply-To: <1458405122-12565-1-git-send-email-jesse@kernel.org>
ipip encapsulated packets can be merged together by GRO but the result
does not have the proper GSO type set or even marked as being
encapsulated at all. Later retransmission of these packets will likely
fail if the device does not support ipip offloads. This is similar to
the issue resolved in IPv6 sit in feec0cb3
("ipv6: gro: support sit protocol").
Reported-by: Patrick Boutilier <boutilpj@ednet.ns.ca>
Fixes: 9667e9bb ("ipip: Add gro callbacks to ipip offload")
Tested-by: Patrick Boutilier <boutilpj@ednet.ns.ca>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jesse Gross <jesse@kernel.org>
---
v2: No change.
---
net/ipv4/af_inet.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 0cc923f..9659233 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1448,6 +1448,13 @@ out_unlock:
return err;
}
+static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
+{
+ skb->encapsulation = 1;
+ skb_shinfo(skb)->gso_type |= SKB_GSO_IPIP;
+ return inet_gro_complete(skb, nhoff);
+}
+
int inet_ctl_sock_create(struct sock **sk, unsigned short family,
unsigned short type, unsigned char protocol,
struct net *net)
@@ -1676,7 +1683,7 @@ static const struct net_offload ipip_offload = {
.callbacks = {
.gso_segment = inet_gso_segment,
.gro_receive = inet_gro_receive,
- .gro_complete = inet_gro_complete,
+ .gro_complete = ipip_gro_complete,
},
};
--
2.5.0
next prev parent reply other threads:[~2016-03-19 16:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 16:31 [PATCH net v2 0/3] Tunneling fixes Jesse Gross
2016-03-19 16:32 ` Jesse Gross [this message]
2016-03-19 16:32 ` [PATCH net v2 2/3] tunnels: Don't apply GRO to multiple layers of encapsulation Jesse Gross
2016-03-26 19:41 ` Tom Herbert
2016-03-28 4:38 ` Jesse Gross
2016-03-28 16:31 ` Tom Herbert
2016-03-28 17:37 ` Alexander Duyck
2016-03-28 18:47 ` Tom Herbert
2016-03-28 19:31 ` Alexander Duyck
2016-03-28 20:03 ` Tom Herbert
2016-03-28 20:34 ` Alexander Duyck
2016-03-28 22:10 ` Tom Herbert
2016-03-28 23:34 ` Jesse Gross
2016-03-29 0:50 ` Tom Herbert
2016-03-29 2:41 ` Alexander Duyck
2016-03-28 19:33 ` David Miller
2016-03-19 16:32 ` [PATCH net v2 3/3] tunnels: Remove encapsulation offloads on decap Jesse Gross
2016-03-20 20:33 ` [PATCH net v2 0/3] Tunneling fixes David Miller
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=1458405122-12565-2-git-send-email-jesse@kernel.org \
--to=jesse@kernel.org \
--cc=boutilpj@ednet.ns.ca \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
/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).