I only have kernel-devel and kernel-headers for 2.6.18-371.1.2.el5 installed, so I don't think there's a conflict between different kernels I have installed.
The problem looks like in 2.6.18-371.1.2.el5 they added the definition of netid_is_bond_slave:
static inline bool netif_is_bond_slave(struct net_device *dev)
{
return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
}
It doesn't match the "backported" version in ofa-kernel-1.5.3:
/tmp/mlnx_iso.7969/OFED_topdir/BUILD/ofa_kernel-1.5.3/kernel_addons/backport/2.6.18-EL5.7/include/linux/netdevice.h
static inline int netif_is_bond_slave(struct net_device *dev)
{
return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
}