diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2018-06-11 17:50:23 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-06-14 12:56:15 -0700 |
commit | 582c78f23ae836503b16b3addacdec052b5c0625 (patch) | |
tree | 90bc1e6b0ee610d4be46715730f4130c8cdc3332 /datapath | |
parent | 2fe15e8c532c58d541fe0540c93b4d510e345fcc (diff) | |
download | openvswitch-582c78f23ae836503b16b3addacdec052b5c0625.tar.gz |
datapath: compat: Fix RHEL 7.5 build warning from ip_tunnel_get_stats64()
This patch fixes warning as the following in RHEL 7.5 kernel.
CC [M] /root/git/ovs/datapath/linux/geneve.o
/root/git/ovs/datapath/linux/geneve.c:1273:2: warning: initialization
from incompatible pointer type [enabled by default]
.ndo_get_stats64 = ip_tunnel_get_stats64,
^
/root/git/ovs/datapath/linux/geneve.c:1273:2: warning: (near
initialization for ‘geneve_netdev_ops.<anonymous>.ndo_get_stats64’)
[enabled by default]
/root/git/ovs/datapath/linux/ip_gre.c:1162:2: warning: initialization
from incompatible pointer type [enabled by default]
.ndo_get_stats64 = ip_tunnel_get_stats64,
^
/root/git/ovs/datapath/linux/ip_gre.c:1162:2: warning: (near
initialization for ‘ipgre_netdev_ops.<anonymous>.ndo_get_stats64’)
[enabled by default]
/root/git/ovs/datapath/linux/ip_gre.c:1180:2: warning: initialization
from incompatible pointer type [enabled by default]
.ndo_get_stats64 = ip_tunnel_get_stats64,
^
Fixes: 436d36db ("compat: Fixups for newer kernels")
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/include/net/ip_tunnels.h | 2 | ||||
-rw-r--r-- | datapath/linux/compat/ip_tunnels_core.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h index b1c383dc8..d187a12d2 100644 --- a/datapath/linux/compat/include/net/ip_tunnels.h +++ b/datapath/linux/compat/include/net/ip_tunnels.h @@ -364,7 +364,7 @@ static inline int ovs_ip_tunnel_encap(struct sk_buff *skb, struct ip_tunnel *t, } #define ip_tunnel_get_stats64 rpl_ip_tunnel_get_stats64 -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) && !defined(HAVE_RHEL7_MAX_MTU) struct rtnl_link_stats64 *rpl_ip_tunnel_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *tot); #else diff --git a/datapath/linux/compat/ip_tunnels_core.c b/datapath/linux/compat/ip_tunnels_core.c index fcb08905e..38fb801e9 100644 --- a/datapath/linux/compat/ip_tunnels_core.c +++ b/datapath/linux/compat/ip_tunnels_core.c @@ -274,7 +274,7 @@ static void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) && !defined(HAVE_RHEL7_MAX_MTU) struct rtnl_link_stats64 *rpl_ip_tunnel_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *tot) #else @@ -306,7 +306,7 @@ void rpl_ip_tunnel_get_stats64(struct net_device *dev, tot->tx_bytes += tx_bytes; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) && !defined(HAVE_RHEL7_MAX_MTU) return tot; #endif } |