mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: Add GSO support for UDP tunnels with checksum
Added a new netif feature for GSO_UDP_TUNNEL_CSUM. This indicates that a device is capable of computing the UDP checksum in the encapsulating header of a UDP tunnel. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e9c3a24b3a
commit
0f4f4ffa7b
8 changed files with 31 additions and 23 deletions
|
|
@ -100,6 +100,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
|
|||
SKB_GSO_IPIP |
|
||||
SKB_GSO_SIT |
|
||||
SKB_GSO_UDP_TUNNEL |
|
||||
SKB_GSO_UDP_TUNNEL_CSUM |
|
||||
SKB_GSO_MPLS |
|
||||
SKB_GSO_TCPV6 |
|
||||
0)))
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
|||
if (unlikely(type & ~(SKB_GSO_UDP |
|
||||
SKB_GSO_DODGY |
|
||||
SKB_GSO_UDP_TUNNEL |
|
||||
SKB_GSO_UDP_TUNNEL_CSUM |
|
||||
SKB_GSO_GRE |
|
||||
SKB_GSO_IPIP |
|
||||
SKB_GSO_SIT |
|
||||
|
|
@ -76,7 +77,8 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (skb->encapsulation && skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL)
|
||||
if (skb->encapsulation && skb_shinfo(skb)->gso_type &
|
||||
(SKB_GSO_UDP_TUNNEL|SKB_GSO_UDP_TUNNEL_CSUM))
|
||||
segs = skb_udp_tunnel_segment(skb, features);
|
||||
else {
|
||||
/* Do software UFO. Complete and fill in the UDP checksum as HW cannot
|
||||
|
|
|
|||
Loading…
Reference in a new issue