diff mbox

[V2] datapath: Fix compilation errors on RT kernel

Message ID 700aa719bf006c752489fee17d22a88394531210.1378978041.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Sept. 12, 2013, 10:11 a.m. UTC
On latest RT kernels we are getting following errors while compiling OVS:

	In file included from openvswitch/datapath/linux/compat/include/linux/if_vlan.h:6:0,
	                 from openvswitch/datapath/linux/actions.c:29:
	lng.git/include/linux/if_vlan.h: In function vlan_insert_tag:
	lng.git/include/linux/if_vlan.h:197:5: error: struct sk_buff has no member named mac
	In file included from openvswitch/datapath/linux/../flow.h:34:0,
	                 from openvswitch/datapath/linux/../datapath.h:31,
	                 from openvswitch/datapath/linux/actions.c:36:
	lng.git/include/net/inet_ecn.h: In function INET_ECN_set_ce:
	lng.git/include/net/inet_ecn.h:137:10: error: struct sk_buff has no member named nh
	lng.git/include/net/inet_ecn.h:142:10: error: struct sk_buff has no member named nh
	openvswitch/datapath/linux/actions.c: In function __pop_vlan_tci:
	openvswitch/datapath/linux/actions.c:72:5: error: struct sk_buff has no member named mac
	make[7]: *** [openvswitch/datapath/linux/actions.o] Error 1
	make[6]: *** [_module_openvswitch/datapath/linux] Error 2

This happened because RT kernel has used raw keyword inside skbuff.h, which was
used to identify some older kernels stuff in OVS.

Lets make the search pattern a bit stronger by searching "*raw;" instead of
"raw".

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
V1->V2:
- Instead of removing OVS_GREP_IFELSE() for searching raw, make grep pattern
  stronger.

 acinclude.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pravin Shelar Sept. 12, 2013, 4:08 p.m. UTC | #1
On Thu, Sep 12, 2013 at 3:11 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On latest RT kernels we are getting following errors while compiling OVS:
>
>         In file included from openvswitch/datapath/linux/compat/include/linux/if_vlan.h:6:0,
>                          from openvswitch/datapath/linux/actions.c:29:
>         lng.git/include/linux/if_vlan.h: In function vlan_insert_tag:
>         lng.git/include/linux/if_vlan.h:197:5: error: struct sk_buff has no member named mac
>         In file included from openvswitch/datapath/linux/../flow.h:34:0,
>                          from openvswitch/datapath/linux/../datapath.h:31,
>                          from openvswitch/datapath/linux/actions.c:36:
>         lng.git/include/net/inet_ecn.h: In function INET_ECN_set_ce:
>         lng.git/include/net/inet_ecn.h:137:10: error: struct sk_buff has no member named nh
>         lng.git/include/net/inet_ecn.h:142:10: error: struct sk_buff has no member named nh
>         openvswitch/datapath/linux/actions.c: In function __pop_vlan_tci:
>         openvswitch/datapath/linux/actions.c:72:5: error: struct sk_buff has no member named mac
>         make[7]: *** [openvswitch/datapath/linux/actions.o] Error 1
>         make[6]: *** [_module_openvswitch/datapath/linux] Error 2
>
> This happened because RT kernel has used raw keyword inside skbuff.h, which was
> used to identify some older kernels stuff in OVS.
>
> Lets make the search pattern a bit stronger by searching "*raw;" instead of
> "raw".
>
If this check is only required for old kernel then we can just remove
this compat code. ovs 2.0 has dropped support for pre-2.6.32 kernel.
Viresh Kumar Sept. 13, 2013, 5:30 a.m. UTC | #2
On 12 September 2013 21:38, Pravin Shelar <pshelar@nicira.com> wrote:
> On Thu, Sep 12, 2013 at 3:11 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> On latest RT kernels we are getting following errors while compiling OVS:
>>
>>         In file included from openvswitch/datapath/linux/compat/include/linux/if_vlan.h:6:0,
>>                          from openvswitch/datapath/linux/actions.c:29:
>>         lng.git/include/linux/if_vlan.h: In function vlan_insert_tag:
>>         lng.git/include/linux/if_vlan.h:197:5: error: struct sk_buff has no member named mac
>>         In file included from openvswitch/datapath/linux/../flow.h:34:0,
>>                          from openvswitch/datapath/linux/../datapath.h:31,
>>                          from openvswitch/datapath/linux/actions.c:36:
>>         lng.git/include/net/inet_ecn.h: In function INET_ECN_set_ce:
>>         lng.git/include/net/inet_ecn.h:137:10: error: struct sk_buff has no member named nh
>>         lng.git/include/net/inet_ecn.h:142:10: error: struct sk_buff has no member named nh
>>         openvswitch/datapath/linux/actions.c: In function __pop_vlan_tci:
>>         openvswitch/datapath/linux/actions.c:72:5: error: struct sk_buff has no member named mac
>>         make[7]: *** [openvswitch/datapath/linux/actions.o] Error 1
>>         make[6]: *** [_module_openvswitch/datapath/linux] Error 2
>>
>> This happened because RT kernel has used raw keyword inside skbuff.h, which was
>> used to identify some older kernels stuff in OVS.
>>
>> Lets make the search pattern a bit stronger by searching "*raw;" instead of
>> "raw".
>>
> If this check is only required for old kernel then we can just remove
> this compat code. ovs 2.0 has dropped support for pre-2.6.32 kernel.

Yes, it only belongs to kernel < 2.6.21

And so my V1 can be applied then :)

http://openvswitch.org/pipermail/dev/2013-August/031076.html
Jesse Gross Sept. 13, 2013, 4:06 p.m. UTC | #3
On Thu, Sep 12, 2013 at 10:30 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 12 September 2013 21:38, Pravin Shelar <pshelar@nicira.com> wrote:
>> On Thu, Sep 12, 2013 at 3:11 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>>> On latest RT kernels we are getting following errors while compiling OVS:
>>>
>>>         In file included from openvswitch/datapath/linux/compat/include/linux/if_vlan.h:6:0,
>>>                          from openvswitch/datapath/linux/actions.c:29:
>>>         lng.git/include/linux/if_vlan.h: In function vlan_insert_tag:
>>>         lng.git/include/linux/if_vlan.h:197:5: error: struct sk_buff has no member named mac
>>>         In file included from openvswitch/datapath/linux/../flow.h:34:0,
>>>                          from openvswitch/datapath/linux/../datapath.h:31,
>>>                          from openvswitch/datapath/linux/actions.c:36:
>>>         lng.git/include/net/inet_ecn.h: In function INET_ECN_set_ce:
>>>         lng.git/include/net/inet_ecn.h:137:10: error: struct sk_buff has no member named nh
>>>         lng.git/include/net/inet_ecn.h:142:10: error: struct sk_buff has no member named nh
>>>         openvswitch/datapath/linux/actions.c: In function __pop_vlan_tci:
>>>         openvswitch/datapath/linux/actions.c:72:5: error: struct sk_buff has no member named mac
>>>         make[7]: *** [openvswitch/datapath/linux/actions.o] Error 1
>>>         make[6]: *** [_module_openvswitch/datapath/linux] Error 2
>>>
>>> This happened because RT kernel has used raw keyword inside skbuff.h, which was
>>> used to identify some older kernels stuff in OVS.
>>>
>>> Lets make the search pattern a bit stronger by searching "*raw;" instead of
>>> "raw".
>>>
>> If this check is only required for old kernel then we can just remove
>> this compat code. ovs 2.0 has dropped support for pre-2.6.32 kernel.
>
> Yes, it only belongs to kernel < 2.6.21

Yes, things have a changed a little since you first posted...

> And so my V1 can be applied then :)
>
> http://openvswitch.org/pipermail/dev/2013-August/031076.html

Applied, thanks.
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 071fe54..57302b0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -240,7 +240,7 @@  AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   # quoting rules.
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid],
                   [OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
-  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [raw],
+  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [\*raw\;],
                   [OVS_DEFINE([HAVE_MAC_RAW])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_dst(],
                   [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])])