kni: fix build with kernel 3.10
[dpdk.git] / lib / librte_eal / linuxapp / kni / ethtool / igb / kcompat.h
index 7a36007..0a578be 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_ */