Due to API changes in functions ndo_dflt_bridge_getlink
(commit
2c3c031c) and ndo_fdb_add (commit
f6f6424b)
in kernel 3.19, DPDK would not build.
This patch solves the problem, by checking the kernel version
and adding the necessary new parameters.
Mind that function igb_ndo_fdb_add does not need the extra parameter
if USE_CONST_DEV_UC_CHAR is not set, since that macro is only defined
when kernel is greater or equal than 3.7
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr,
static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr,
+#ifdef HAVE_NDO_FDB_ADD_VID
+ u16 vid,
+#endif
u16 flags)
#else
static int igb_ndo_fdb_add(struct ndmsg *ndm,
u16 flags)
#else
static int igb_ndo_fdb_add(struct ndmsg *ndm,
else
mode = BRIDGE_MODE_VEPA;
else
mode = BRIDGE_MODE_VEPA;
+#ifdef HAVE_NDO_FDB_ADD_VID
+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
+#else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
+#endif /* HAVE_NDO_FDB_ADD_VID */
}
#endif /* HAVE_BRIDGE_ATTRIBS */
#endif /* NTF_SELF */
}
#endif /* HAVE_BRIDGE_ATTRIBS */
#endif /* NTF_SELF */
#define HAVE_VF_MIN_MAX_TXRATE 1
#endif /* >= 3.16.0 */
#define HAVE_VF_MIN_MAX_TXRATE 1
#endif /* >= 3.16.0 */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) )
+#define HAVE_NDO_FDB_ADD_VID
+#endif /* >= 3.19.0 */
+