diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-08-07 14:48:53 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-08-07 15:04:58 -0700 |
commit | 274e04f98287c59d2a5c5dd90b820b066b529162 (patch) | |
tree | acbaf651fab160b19aee064ec4c14d51ccc05dcb /datapath | |
parent | f689fe1e9706fb0b5817cb6ff5c20941dd5295b7 (diff) | |
download | openvswitch-274e04f98287c59d2a5c5dd90b820b066b529162.tar.gz |
ip_gre: remove redundant variables t_hlen
Upstream commit:
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 1 Aug 2018 10:04:02 +0800
Subject: [PATCH] ip_gre: remove redundant variables t_hlen
After commit ffc2b6ee4174 ("ip_gre: fix IFLA_MTU ignored on NEWLINK")
variable t_hlen is assigned values that are never read,
hence they are redundant and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/ip_gre.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 47ee525d9..47ed5e0d6 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -681,7 +681,6 @@ err_free_skb: static void __gre_tunnel_init(struct net_device *dev) { struct ip_tunnel *tunnel; - int t_hlen; tunnel = netdev_priv(dev); tunnel->tun_hlen = ip_gre_calc_hlen(tunnel->parms.o_flags); @@ -689,8 +688,6 @@ static void __gre_tunnel_init(struct net_device *dev) tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen; - t_hlen = tunnel->hlen + sizeof(struct iphdr); - dev->features |= GRE_FEATURES; dev->hw_features |= GRE_FEATURES; @@ -1031,13 +1028,11 @@ EXPORT_SYMBOL_GPL(ovs_gre_fill_metadata_dst); static int erspan_tunnel_init(struct net_device *dev) { struct ip_tunnel *tunnel = netdev_priv(dev); - int t_hlen; tunnel->tun_hlen = 8; tunnel->parms.iph.protocol = IPPROTO_GRE; tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen + erspan_hdr_len(tunnel->erspan_ver); - t_hlen = tunnel->hlen + sizeof(struct iphdr); dev->features |= GRE_FEATURES; dev->hw_features |= GRE_FEATURES; |