DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5
@ 2014-04-15 13:51 David Marchand
  2014-04-15 13:51 ` [dpdk-dev] [PATCH 2/2] kni: more compatibility with RHEL 6.4/6.5 David Marchand
  2014-04-17 22:23 ` [dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5 Thomas Monjalon
  0 siblings, 2 replies; 4+ messages in thread
From: David Marchand @ 2014-04-15 13:51 UTC (permalink / raw)
  To: dev

From: Jean-Mickael Guerin <jean-mickael.guerin@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@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-17 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 13:51 [dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5 David Marchand
2014-04-15 13:51 ` [dpdk-dev] [PATCH 2/2] kni: more compatibility with RHEL 6.4/6.5 David Marchand
2014-04-17 22:24   ` Thomas Monjalon
2014-04-17 22:23 ` [dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5 Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).