Commit 62ebaeae authored by Yuki Taguchi's avatar Yuki Taguchi Committed by David S. Miller

ipv6: sr: remove SKB_GSO_IPXIP6 on End.D* actions

After LRO/GRO is applied, SRv6 encapsulated packets have
SKB_GSO_IPXIP6 feature flag, and this flag must be removed right after
decapulation procedure.

Currently, SKB_GSO_IPXIP6 flag is not removed on End.D* actions, which
creates inconsistent packet state, that is, a normal TCP/IP packets
have the SKB_GSO_IPXIP6 flag. This behavior can cause unexpected
fallback to GSO on routing to netdevices that do not support
SKB_GSO_IPXIP6. For example, on inter-VRF forwarding, decapsulated
packets separated into small packets by GSO because VRF devices do not
support TSO for packets with SKB_GSO_IPXIP6 flag, and this degrades
forwarding performance.

This patch removes encapsulation related GSO flags from the skb right
after the End.D* action is applied.

Fixes: d7a669dd ("ipv6: sr: add helper functions for seg6local")
Signed-off-by: default avatarYuki Taguchi <tagyounit@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9c5ed2f8
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <net/addrconf.h> #include <net/addrconf.h>
#include <net/ip6_route.h> #include <net/ip6_route.h>
#include <net/dst_cache.h> #include <net/dst_cache.h>
#include <net/ip_tunnels.h>
#ifdef CONFIG_IPV6_SEG6_HMAC #ifdef CONFIG_IPV6_SEG6_HMAC
#include <net/seg6_hmac.h> #include <net/seg6_hmac.h>
#endif #endif
...@@ -135,7 +136,8 @@ static bool decap_and_validate(struct sk_buff *skb, int proto) ...@@ -135,7 +136,8 @@ static bool decap_and_validate(struct sk_buff *skb, int proto)
skb_reset_network_header(skb); skb_reset_network_header(skb);
skb_reset_transport_header(skb); skb_reset_transport_header(skb);
skb->encapsulation = 0; if (iptunnel_pull_offloads(skb))
return false;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment