From 22367416b006d271fd061d6f5c15feee844e7886 Mon Sep 17 00:00:00 2001 From: Jean-Mickael Guerin Date: Tue, 15 Apr 2014 15:51:22 +0200 Subject: [PATCH] kni: disable FDB operations on RHEL 6.5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On RH 6.5: igb_main.c:2298: error: unknown field ‘ndo_fdb_add’ specified in initializer FDB ops are present in RH 6.5 via the extension of netdev, so add the ifdef inside the netdev ops definition of igb. However, FDB functions are not set for RHEL 6.5: the implementation relies on dev_mc_add_excl API which has not been backported. Signed-off-by: Jean-Mickael Guerin Acked-by: Thomas Monjalon --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 ++ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c index 63882070de..fd488811ec 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c @@ -2294,12 +2294,14 @@ static const struct net_device_ops igb_netdev_ops = { #ifdef HAVE_VLAN_RX_REGISTER .ndo_vlan_rx_register = igb_vlan_mode, #endif +#ifndef HAVE_RHEL6_NETDEV_OPS_EXT_FDB #ifdef NTF_SELF .ndo_fdb_add = igb_ndo_fdb_add, #ifndef USE_DEFAULT_FDB_DEL_DUMP .ndo_fdb_del = igb_ndo_fdb_del, .ndo_fdb_dump = igb_ndo_fdb_dump, #endif +#endif /* ! HAVE_RHEL6_NETDEV_OPS_EXT_FDB */ #ifdef HAVE_BRIDGE_ATTRIBS .ndo_bridge_setlink = igb_ndo_bridge_setlink, .ndo_bridge_getlink = igb_ndo_bridge_getlink, diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 4b2c940980..166b0644e5 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -2837,6 +2837,12 @@ static inline bool pci_is_pcie(struct pci_dev *dev) #define HAVE_ETHTOOL_GET_TS_INFO #endif /* RHEL >= 6.4 && RHEL < 7.0 */ +#if (RHEL_RELEASE_CODE && \ + (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5)) && \ + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0))) +#define HAVE_RHEL6_NETDEV_OPS_EXT_FDB +#endif /* RHEL >= 6.5 && RHEL < 7.0 */ + #else /* < 2.6.33 */ #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #ifndef HAVE_NETDEV_OPS_FCOE_GETWWN -- 2.20.1