X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Flinux%2Fnetdevice.h;h=1ac3831287a55c21d4f0ba6d412d75b837dead38;hb=d9065a90b6b955aa38586c952e8804ca7a22547e;hp=04ebd89a77e33b45c6e32382bc0ef020f57a45cb;hpb=f37c91c76785e335e9d89aa31a7f0ab290223193;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h index 04ebd89a7..1ac383128 100644 --- a/datapath/linux/compat/include/linux/netdevice.h +++ b/datapath/linux/compat/include/linux/netdevice.h @@ -141,4 +141,30 @@ static inline struct net_device *dev_get_by_index_rcu(struct net *net, int ifind #define NETIF_F_FSO 0 #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +#define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) +#define NETIF_F_IPV6_CSUM 16 /* Can checksum TCP/UDP over IPV6 */ + +#define NETIF_F_V4_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IP_CSUM) +#define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) +#define skb_gso_segment rpl_skb_gso_segment +struct sk_buff *rpl_skb_gso_segment(struct sk_buff *skb, u32 features); + +#define netif_skb_features rpl_netif_skb_features +u32 rpl_netif_skb_features(struct sk_buff *skb); + +#define netif_needs_gso rpl_netif_needs_gso +static inline int rpl_netif_needs_gso(struct sk_buff *skb, int features) +{ + return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || + unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); +} +#endif + #endif