diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2018-05-17 12:39:51 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-05-23 15:34:33 -0700 |
commit | 3ab8a26e778e601f896f6a235d899a4aed754291 (patch) | |
tree | f13150c9bae84354f3950d72e239843c51340d55 /datapath | |
parent | cda91769e20f9f7cbd5c69688c5766c6b28ffa0f (diff) | |
download | openvswitch-3ab8a26e778e601f896f6a235d899a4aed754291.tar.gz |
datapath: compat: Fix ndo_size in RHEL 7.5 backport
If 'ndo_size' is not set in 'struct net_device_ops', RHEL kernel will not
make use of functions in 'struct net_device_ops_extended'.
Fixes: 39ca338374ab ("datapath: compat: Fix build on RHEL 7.5")
Reported-by: Jiri Benc <jbenc@redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-May/347070.html
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Jiri Benc <jbenc@redhat.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/geneve.c | 1 | ||||
-rw-r--r-- | datapath/linux/compat/ip_gre.c | 1 | ||||
-rw-r--r-- | datapath/linux/compat/lisp.c | 1 | ||||
-rw-r--r-- | datapath/linux/compat/stt.c | 1 | ||||
-rw-r--r-- | datapath/linux/compat/vxlan.c | 2 |
5 files changed, 6 insertions, 0 deletions
diff --git a/datapath/linux/compat/geneve.c b/datapath/linux/compat/geneve.c index eacffb2c5..0fcc6e51d 100644 --- a/datapath/linux/compat/geneve.c +++ b/datapath/linux/compat/geneve.c @@ -1272,6 +1272,7 @@ static const struct net_device_ops geneve_netdev_ops = { .ndo_start_xmit = geneve_dev_xmit, .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = geneve_change_mtu, #else .ndo_change_mtu = geneve_change_mtu, diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 484a890d4..4e5565ee3 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -1189,6 +1189,7 @@ static const struct net_device_ops gre_tap_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = ip_tunnel_change_mtu, #else .ndo_change_mtu = ip_tunnel_change_mtu, diff --git a/datapath/linux/compat/lisp.c b/datapath/linux/compat/lisp.c index 41531adf1..eb45d5f3d 100644 --- a/datapath/linux/compat/lisp.c +++ b/datapath/linux/compat/lisp.c @@ -547,6 +547,7 @@ static const struct net_device_ops lisp_netdev_ops = { .ndo_stop = lisp_stop, .ndo_start_xmit = lisp_dev_xmit, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = lisp_change_mtu, #else .ndo_change_mtu = lisp_change_mtu, diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index 69859e2a4..2426223db 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -1852,6 +1852,7 @@ static const struct net_device_ops stt_netdev_ops = { .ndo_start_xmit = stt_dev_xmit, .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = stt_change_mtu, #else .ndo_change_mtu = stt_change_mtu, diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c index 40cb12b13..fa4e7b11c 100644 --- a/datapath/linux/compat/vxlan.c +++ b/datapath/linux/compat/vxlan.c @@ -1482,6 +1482,7 @@ static const struct net_device_ops vxlan_netdev_ether_ops = { .ndo_get_stats64 = ip_tunnel_get_stats64, .ndo_set_rx_mode = vxlan_set_multicast_list, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = vxlan_change_mtu, #else .ndo_change_mtu = vxlan_change_mtu, @@ -1501,6 +1502,7 @@ static const struct net_device_ops vxlan_netdev_raw_ops = { .ndo_start_xmit = vxlan_dev_xmit, .ndo_get_stats64 = ip_tunnel_get_stats64, #ifdef HAVE_RHEL7_MAX_MTU + .ndo_size = sizeof(struct net_device_ops), .extended.ndo_change_mtu = vxlan_change_mtu, #else .ndo_change_mtu = vxlan_change_mtu, |