]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
kni: fix build with kernel 3.10
[dpdk.git] / lib / librte_eal / linuxapp / kni / ethtool / igb / kcompat.h
index 7a36007c1fdd1247dd576942e4d8e40f812cc25f..0a578be7515fa2126267bacf494e80ea38ad25a3 100644 (file)
@@ -301,9 +301,11 @@ struct _kc_vlan_hdr {
        __be16          h_vlan_encapsulated_proto;
 };
 #define vlan_hdr _kc_vlan_hdr
+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) )
 #define vlan_tx_tag_present(_skb) 0
 #define vlan_tx_tag_get(_skb) 0
 #endif
+#endif
 
 #ifndef VLAN_PRIO_SHIFT
 #define VLAN_PRIO_SHIFT 13
@@ -3049,4 +3051,13 @@ typedef u32 netdev_features_t;
 #else
 #define HAVE_FDB_OPS
 #endif /* < 3.5.0 */
+
+/*****************************************************************************/
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) )
+#define NETIF_F_HW_VLAN_TX     NETIF_F_HW_VLAN_CTAG_TX
+#define NETIF_F_HW_VLAN_RX     NETIF_F_HW_VLAN_CTAG_RX
+#define NETIF_F_HW_VLAN_FILTER NETIF_F_HW_VLAN_CTAG_FILTER
+#define HAVE_VLAN_PROTOCOL
+#endif /* >= 3.10.0 */
+
 #endif /* _KCOMPAT_H_ */