compat-4.5.h: Added skb_inner_transport_offset
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 7 Nov 2016 13:46:24 +0000 (15:46 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 7 Nov 2016 13:46:24 +0000 (15:46 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
include/linux/compat-4.5.h

index 6621346..c4fe561 100644 (file)
 #define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
 #endif
 
+#include <linux/skbuff.h>
+
+#define skb_inner_transport_offset LINUX_BACKPORT(skb_inner_transport_offset)
+static inline int skb_inner_transport_offset(const struct sk_buff *skb)
+{
+       return skb_inner_transport_header(skb) - skb->data;
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)) */
 
 #endif /* LINUX_4_5_COMPAT_H */