* [PATCH] datapath: Fix build breakage on kernel 2.6.40
@ 2011-12-05 2:33 Zhi Yong Wu
2011-12-05 17:32 ` Jesse Gross
0 siblings, 1 reply; 6+ messages in thread
From: Zhi Yong Wu @ 2011-12-05 2:33 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ
Cc: aliguori-r/Jw6+rmf7HQT0dZR+AlfA, stefanha-Re5JQEeQqe8AvxtiuMwx3w,
ryanh-r/Jw6+rmf7HQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA
Today i played with openvswitch on my workstation with kernel 2.6.40 and found that it break when i built. The
+issue is introduced by commit ceb176fdb72bb7ce90debc66e1eeb1d25823d30a
Below is the error log:
from /home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.c:10:
/home/zwu/work/virt/openvswitch/datapath/linux/compat/include/linux/skbuff.h:243:20: error: redefinition of
+‘skb_reset_mac_len’
include/linux/skbuff.h:1259:20: note: previous definition of ‘skb_reset_mac_len’ was here
make[5]: *** [/home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.o] Error 1
make[4]: *** [_module_/home/zwu/work/virt/openvswitch/datapath/linux] Error 2
make[4]: Leaving directory `/usr/src/kernels/2.6.40.6-0.fc15.x86_64'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zwu/work/virt/openvswitch'
make: *** [all] Error 2
Signed-off-by: Zhi Yong Wu <zwu.kernel@gmail.com>
---
datapath/linux/compat/include/linux/skbuff.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
index 311bfdb..96d8012 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)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)
static inline void skb_reset_mac_len(struct sk_buff *skb)
{
skb->mac_len = skb->network_header - skb->mac_header;
--
1.7.6
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] datapath: Fix build breakage on kernel 2.6.40
2011-12-05 2:33 [PATCH] datapath: Fix build breakage on kernel 2.6.40 Zhi Yong Wu
@ 2011-12-05 17:32 ` Jesse Gross
0 siblings, 0 replies; 6+ messages in thread
From: Jesse Gross @ 2011-12-05 17:32 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: dev, stefanha, netdev, aliguori, ryanh
On Sun, Dec 4, 2011 at 6:33 PM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
> Today i played with openvswitch on my workstation with kernel 2.6.40 and found that it break when i built. The
> +issue is introduced by commit ceb176fdb72bb7ce90debc66e1eeb1d25823d30a
>
> Below is the error log:
>
> from /home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.c:10:
> /home/zwu/work/virt/openvswitch/datapath/linux/compat/include/linux/skbuff.h:243:20: error: redefinition of
> +‘skb_reset_mac_len’
> include/linux/skbuff.h:1259:20: note: previous definition of ‘skb_reset_mac_len’ was here
> make[5]: *** [/home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.o] Error 1
> make[4]: *** [_module_/home/zwu/work/virt/openvswitch/datapath/linux] Error 2
> make[4]: Leaving directory `/usr/src/kernels/2.6.40.6-0.fc15.x86_64'
> make[3]: *** [default] Error 2
> make[3]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath/linux'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/zwu/work/virt/openvswitch'
> make: *** [all] Error 2
>
>
> Signed-off-by: Zhi Yong Wu <zwu.kernel@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] datapath: Fix build breakage on kernel 2.6.40
[not found] ` <CAEH94Li8gdMZnwSHG_xQj761uRxedRX2nUVmhFV4Kt_EDeuzYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-12-02 23:38 ` Jesse Gross
0 siblings, 0 replies; 6+ messages in thread
From: Jesse Gross @ 2011-12-02 23:38 UTC (permalink / raw)
To: Zhi Yong Wu
Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
aliguori-r/Jw6+rmf7HQT0dZR+AlfA, stefanha-Re5JQEeQqe8AvxtiuMwx3w
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.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] datapath: Fix build breakage on kernel 2.6.40
[not found] ` <CAEP_g=9CNRE=-B2V2=-CQA2MyzOsoqXPP_rjjvqGKWw_peNOkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-12-02 2:25 ` Zhi Yong Wu
[not found] ` <CAEH94Li8gdMZnwSHG_xQj761uRxedRX2nUVmhFV4Kt_EDeuzYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Zhi Yong Wu @ 2011-12-02 2:25 UTC (permalink / raw)
To: Jesse Gross
Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
aliguori-r/Jw6+rmf7HQT0dZR+AlfA, stefanha-Re5JQEeQqe8AvxtiuMwx3w
On Thu, Dec 1, 2011 at 5:55 AM, Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org> wrote:
> On Wed, Nov 23, 2011 at 1:58 AM, Zhi Yong Wu <zwu.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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?
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] datapath: Fix build breakage on kernel 2.6.40
[not found] ` <1322042318-4809-1-git-send-email-zwu.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-11-30 21:55 ` Jesse Gross
[not found] ` <CAEP_g=9CNRE=-B2V2=-CQA2MyzOsoqXPP_rjjvqGKWw_peNOkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jesse Gross @ 2011-11-30 21:55 UTC (permalink / raw)
To: Zhi Yong Wu
Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
aliguori-r/Jw6+rmf7HQT0dZR+AlfA, stefanha-Re5JQEeQqe8AvxtiuMwx3w
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)?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] datapath: Fix build breakage on kernel 2.6.40
@ 2011-11-23 9:58 Zhi Yong Wu
[not found] ` <1322042318-4809-1-git-send-email-zwu.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Zhi Yong Wu @ 2011-11-23 9:58 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, aliguori-r/Jw6+rmf7HQT0dZR+AlfA,
stefanha-Re5JQEeQqe8AvxtiuMwx3w
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Today i played with openvswitch on my workstation with kernel 2.6.40 and found that it break when i built. The issue is introduced by commit ceb176fdb72bb7ce90debc66e1eeb1d25823d30a
Below is the error log.
from /home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.c:10:
/home/zwu/work/virt/openvswitch/datapath/linux/compat/include/linux/skbuff.h:243:20: error: redefinition of ‘skb_reset_mac_len’
include/linux/skbuff.h:1259:20: note: previous definition of ‘skb_reset_mac_len’ was here
make[5]: *** [/home/zwu/work/virt/openvswitch/datapath/linux/genetlink-brcompat.o] Error 1
make[4]: *** [_module_/home/zwu/work/virt/openvswitch/datapath/linux] Error 2
make[4]: Leaving directory `/usr/src/kernels/2.6.40.6-0.fc15.x86_64'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zwu/work/virt/openvswitch/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zwu/work/virt/openvswitch'
make: *** [all] Error 2
After this patch is applied, i can successfully do one build and be happy to see that multiple VMs can communicate with each other.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
acinclude.m4 | 2 ++
datapath/linux/compat/include/linux/skbuff.h | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
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;
--
1.7.6
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-05 17:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 2:33 [PATCH] datapath: Fix build breakage on kernel 2.6.40 Zhi Yong Wu
2011-12-05 17:32 ` Jesse Gross
-- strict thread matches above, loose matches on Subject: below --
2011-11-23 9:58 Zhi Yong Wu
[not found] ` <1322042318-4809-1-git-send-email-zwu.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-11-30 21:55 ` Jesse Gross
[not found] ` <CAEP_g=9CNRE=-B2V2=-CQA2MyzOsoqXPP_rjjvqGKWw_peNOkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 2:25 ` Zhi Yong Wu
[not found] ` <CAEH94Li8gdMZnwSHG_xQj761uRxedRX2nUVmhFV4Kt_EDeuzYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 23:38 ` Jesse Gross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.