diff options
author | Adrien Mazarguil <adrien.mazarguil@6wind.com> | 2013-03-21 11:09:23 +0100 |
---|---|---|
committer | David Marchand <david.marchand@6wind.com> | 2014-02-26 11:07:28 +0100 |
commit | 205c33c45af62349fcbfa700c7cf5d2b32973498 (patch) | |
tree | 9db953b568c2b2424a574f5c917b20c82353de4d /lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | |
parent | fd52b477818e3844f62f3d43d2c321af39c3f287 (diff) | |
download | dpdk-205c33c45af62349fcbfa700c7cf5d2b32973498.zip dpdk-205c33c45af62349fcbfa700c7cf5d2b32973498.tar.gz dpdk-205c33c45af62349fcbfa700c7cf5d2b32973498.tar.xz |
kni: fix build with kernel < 3.3 with netdev_features_t backport
The netdev_features_t typedef appeared in Linux 3.3, but checking the kernel
version isn't enough with some distributions (such as Debian Wheezy) that
backported it into 3.2, causing a compilation failure due to redefinition.
Since the presence of a typedef can't be tested at compile time, this commit
adds type kni_netdev_features_t, which, depending on the kernel version,
translates either to u32 or netdev_features_t.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h')
-rw-r--r-- | lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h index 112226d..3fe777a 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h @@ -3082,8 +3082,9 @@ static inline void __kc_skb_frag_unref(skb_frag_t *frag) /*****************************************************************************/ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ) -typedef u32 netdev_features_t; +typedef u32 kni_netdev_features_t; #else /* ! < 3.3.0 */ +typedef netdev_features_t kni_netdev_features_t; #define HAVE_INT_NDO_VLAN_RX_ADD_VID #ifdef ETHTOOL_SRXNTUPLE #undef ETHTOOL_SRXNTUPLE |