udp_tunnel: Remove redundant udp_tunnel_gro_complete().
authorJarno Rajahalme <jarno@ovn.org>
Tue, 3 May 2016 23:10:20 +0000 (16:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 May 2016 22:25:26 +0000 (18:25 -0400)
The setting of the UDP tunnel GSO type is already performed by
udp[46]_gro_complete().

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c
drivers/net/vxlan.c
include/net/udp_tunnel.h
net/ipv4/fou.c

index bc168894bda32d0723f7d77aa475f59bd2c7d75a..98f12244714fb0e107b339771e4092a982ef8e3a 100644 (file)
@@ -504,8 +504,6 @@ static int geneve_gro_complete(struct sk_buff *skb, int nhoff,
        int gh_len;
        int err = -ENOSYS;
 
-       udp_tunnel_gro_complete(skb, nhoff);
-
        gh = (struct genevehdr *)(skb->data + nhoff);
        gh_len = geneve_hlen(gh);
        type = gh->proto_type;
index 1c0fa364323e280f2ed25c86bdcb8f3508a26c34..dd2d032fba5ff4a588f5115c61c24d66bebbccc4 100644 (file)
@@ -616,8 +616,6 @@ out:
 static int vxlan_gro_complete(struct sk_buff *skb, int nhoff,
                              struct udp_offload *uoff)
 {
-       udp_tunnel_gro_complete(skb, nhoff);
-
        return eth_gro_complete(skb, nhoff + sizeof(struct vxlanhdr));
 }
 
index b83114077cee33d184a2bef45da1be686f94a72f..a1140249ec25dfad777f12664de3845574814f8e 100644 (file)
@@ -106,15 +106,6 @@ static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb,
        return iptunnel_handle_offloads(skb, type);
 }
 
-static inline void udp_tunnel_gro_complete(struct sk_buff *skb, int nhoff)
-{
-       struct udphdr *uh;
-
-       uh = (struct udphdr *)(skb->data + nhoff - sizeof(struct udphdr));
-       skb_shinfo(skb)->gso_type |= uh->check ?
-                               SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL;
-}
-
 static inline void udp_tunnel_encap_enable(struct socket *sock)
 {
 #if IS_ENABLED(CONFIG_IPV6)
index a39068b4a4d99383096c3c970c4c15f1ee464617..305d9ac68bd94f900882670cf3dc12564dd8fbef 100644 (file)
@@ -228,8 +228,6 @@ static int fou_gro_complete(struct sk_buff *skb, int nhoff,
        int err = -ENOSYS;
        const struct net_offload **offloads;
 
-       udp_tunnel_gro_complete(skb, nhoff);
-
        rcu_read_lock();
        offloads = NAPI_GRO_CB(skb)->is_ipv6 ? inet6_offloads : inet_offloads;
        ops = rcu_dereference(offloads[proto]);