Message ID | 1322042318-4809-1-git-send-email-zwu.kernel@gmail.com |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Nov 23, 2011 at 1:58 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote: > diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h > index 311bfdb..22ba2e6 100644 > --- a/datapath/linux/compat/include/linux/skbuff.h > +++ b/datapath/linux/compat/include/linux/skbuff.h > @@ -239,7 +239,7 @@ static inline struct page *skb_frag_page(const skb_frag_t *frag) > } > #endif > > -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) > +#ifndef HAVE_SKB_RESET_MAC_LEN 2.6.40 is the early name for 3.0. Does it work if you just replace the check with KERNEL_VERSION(2,6,40)? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 1, 2011 at 5:55 AM, Jesse Gross <jesse@nicira.com> wrote: > On Wed, Nov 23, 2011 at 1:58 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote: >> diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h >> index 311bfdb..22ba2e6 100644 >> --- a/datapath/linux/compat/include/linux/skbuff.h >> +++ b/datapath/linux/compat/include/linux/skbuff.h >> @@ -239,7 +239,7 @@ static inline struct page *skb_frag_page(const skb_frag_t *frag) >> } >> #endif >> >> -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) >> +#ifndef HAVE_SKB_RESET_MAC_LEN > > 2.6.40 is the early name for 3.0. Does it work if you just replace > the check with KERNEL_VERSION(2,6,40)? Yeah, it can work now, but i don't know if this issue exist on other old kernel version < 2.6.40. Should we send one updated patch for this based on your suggestion?
On Thu, Dec 1, 2011 at 6:25 PM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote: > On Thu, Dec 1, 2011 at 5:55 AM, Jesse Gross <jesse@nicira.com> wrote: >> On Wed, Nov 23, 2011 at 1:58 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote: >>> diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h >>> index 311bfdb..22ba2e6 100644 >>> --- a/datapath/linux/compat/include/linux/skbuff.h >>> +++ b/datapath/linux/compat/include/linux/skbuff.h >>> @@ -239,7 +239,7 @@ static inline struct page *skb_frag_page(const skb_frag_t *frag) >>> } >>> #endif >>> >>> -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) >>> +#ifndef HAVE_SKB_RESET_MAC_LEN >> >> 2.6.40 is the early name for 3.0. Does it work if you just replace >> the check with KERNEL_VERSION(2,6,40)? > Yeah, it can work now, but i don't know if this issue exist on other > old kernel version < 2.6.40. Usually we just do these types of checks as we see examples of actual backporting to avoid having hundreds of tests at configure time. In this case, I think the issue is just a difference in how the same kernel is numbered not backporting, so there isn't really a reason to believe that this is a bigger problem. > Should we send one updated patch for this based on your suggestion? That would be great, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/acinclude.m4 b/acinclude.m4 index 648132a..32cdf17 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -233,6 +233,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_cow_head]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_transport_header], [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len], + [OVS_DEFINE([HAVE_SKB_RESET_MAC_LEN])]) OVS_GREP_IFELSE([$KSRC/include/linux/icmpv6.h], [icmp6_hdr], [OVS_DEFINE([HAVE_ICMP6_HDR])]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro], diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index 311bfdb..22ba2e6 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -239,7 +239,7 @@ static inline struct page *skb_frag_page(const skb_frag_t *frag) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) +#ifndef HAVE_SKB_RESET_MAC_LEN static inline void skb_reset_mac_len(struct sk_buff *skb) { skb->mac_len = skb->network_header - skb->mac_header;