From: Hauke Mehrtens Date: Fri, 17 Dec 2010 22:41:36 +0000 (-0800) Subject: compat: backport skb_checksum_start_offset X-Git-Tag: v2.6.38-rc1-1~11 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=dbafa57910460edc809f62c4c7331af0800197e8;p=~emulex%2Ffor-vlad%2Fcompat.git compat: backport skb_checksum_start_offset This is needed by atlx, atl1c and atl1e. Signed-off-by: Hauke Mehrtens --- diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index dfc406e..0521156 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.h @@ -6,6 +6,7 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) #include +#include /* * This is not part of The 2.6.37 kernel yet but we @@ -56,6 +57,11 @@ static inline unsigned long ewma_read(const struct ewma *avg) #define pr_warn pr_warning +static inline int skb_checksum_start_offset(const struct sk_buff *skb) +{ + return skb->csum_start - skb_headroom(skb); +} + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */ #endif /* LINUX_26_38_COMPAT_H */