as per df8a39defad46b83694ea6dd868d332976d62cc0 Signed-off-by: Arthur Gautier <ba...@gandi.net> --- src/i40e/i40e_txrx.c | 4 ++-- src/i40e/kcompat.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/i40e/i40e_txrx.c b/src/i40e/i40e_txrx.c index bf30181..cfa448e 100644 --- a/src/i40e/i40e_txrx.c +++ b/src/i40e/i40e_txrx.c @@ -2171,8 +2171,8 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb, u32 tx_flags = 0; /* if we have a HW VLAN tag being added, default to the HW one */ - if (vlan_tx_tag_present(skb)) { - tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; + if (skb_vlan_tag_present(skb)) { + tx_flags |= skb_vlan_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; tx_flags |= I40E_TX_FLAGS_HW_VLAN; /* else if it is a SW VLAN, check the next protocol and store the tag */ } else if (protocol == htons(ETH_P_8021Q)) { diff --git a/src/i40e/kcompat.h b/src/i40e/kcompat.h index c3872b8..f37ec43 100644 --- a/src/i40e/kcompat.h +++ b/src/i40e/kcompat.h @@ -4400,4 +4400,10 @@ extern unsigned int __kc_eth_get_headlen(unsigned char *data, unsigned int max_l #define HAVE_INCLUDE_LINUX_TIMECOUNTER_H #endif /* 3.20.0 */ +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) ) +#define skb_vlan_tag_present(skb) vlan_tx_tag_present(skb) +#define skb_vlan_tag_get(skb) vlan_tx_tag_get(skb) +#else +#endif /* 4.0.0 */ + #endif /* _KCOMPAT_H_ */ -- 2.1.4 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired