1 #ifndef __LINUX_NETDEV_FEATURES_WRAPPER_H
2 #define __LINUX_NETDEV_FEATURES_WRAPPER_H
4 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
5 #include_next <linux/netdev_features.h>
8 #if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
9 /* On RHEL 6, netdev features are defined in netdevice.h header. */
10 #include <linux/netdevice.h>
13 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
14 #define NETIF_F_HW_VLAN_CTAG_TX NETIF_F_HW_VLAN_TX
17 #ifndef NETIF_F_GSO_GRE
18 #define NETIF_F_GSO_GRE 0
21 #ifndef NETIF_F_GSO_GRE_CSUM
22 #define NETIF_F_GSO_GRE_CSUM 0
24 #define HAVE_NETIF_F_GSO_GRE_CSUM
27 #ifndef NETIF_F_GSO_IPIP
28 #define NETIF_F_GSO_IPIP 0
31 #ifndef NETIF_F_GSO_SIT
32 #define NETIF_F_GSO_SIT 0
35 #ifndef NETIF_F_GSO_UDP_TUNNEL
36 #define NETIF_F_GSO_UDP_TUNNEL 0
38 #define HAVE_NETIF_F_GSO_UDP_TUNNEL 0
41 #ifndef NETIF_F_GSO_UDP_TUNNEL_CSUM
42 #define NETIF_F_GSO_UDP_TUNNEL_CSUM 0
43 #define SKB_GSO_UDP_TUNNEL_CSUM 0
46 #ifndef NETIF_F_GSO_MPLS
47 #define NETIF_F_GSO_MPLS 0
50 #ifndef NETIF_F_HW_VLAN_STAG_TX
51 #define NETIF_F_HW_VLAN_STAG_TX 0
54 #ifndef NETIF_F_GSO_TUNNEL_REMCSUM
55 #define NETIF_F_GSO_TUNNEL_REMCSUM 0
56 #define SKB_GSO_TUNNEL_REMCSUM 0
58 /* support for REM_CSUM is added in 3.19 but API are not defined
59 * till 4.0, so turn on REMSUM support on kernel 4.0 onwards.
61 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
62 #define HAVE_NETIF_F_GSO_TUNNEL_REMCSUM
66 #ifndef NETIF_F_RXCSUM
67 #define NETIF_F_RXCSUM 0
70 #ifndef NETIF_F_GSO_ENCAP_ALL
71 #define NETIF_F_GSO_ENCAP_ALL (NETIF_F_GSO_GRE | \
72 NETIF_F_GSO_GRE_CSUM | \
75 NETIF_F_GSO_UDP_TUNNEL | \
76 NETIF_F_GSO_UDP_TUNNEL_CSUM | \
80 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
84 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
85 #define SKB_GSO_UDP_TUNNEL 0
88 #ifndef HAVE_NETIF_F_GSO_GRE_CSUM
89 #define SKB_GSO_GRE_CSUM 0