[dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5

David Marchand david.marchand at 6wind.com
Tue Apr 15 15:51:22 CEST 2014


From: Jean-Mickael Guerin <jean-mickael.guerin at 6wind.com>

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 <jean-mickael.guerin at 6wind.com>
---
 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 6933626..54b3ccf 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 a404c9f..70bc1a2 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
-- 
1.7.10.4



More information about the dev mailing list