diff mbox

[ovs-dev] datapath: remove HAVE_MAC_RAW

Message ID ecbe29c8bfcca142cdfa6e32981405a1b25e02d0.1377498371.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Aug. 26, 2013, 6:36 a.m. UTC
This was causing it to fail against latest RT kernels, with following errors:

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

Not sure why it was added earlier but my guess is, for earlier RT kernels struct
sk_buff had following variables mac.raw, nh.raw, h.raw instead of mac_header,
network_header, transport_header. And so the hack to rename them in OVS code.
But that's not the case now. RT kernel have mac_header, network_header and
transport_header as parameter and so we don't need this macro at all.

Lets get rid of it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 acinclude.m4                                 | 2 --
 datapath/linux/compat/include/linux/skbuff.h | 6 ------
 2 files changed, 8 deletions(-)

Comments

Jesse Gross Aug. 26, 2013, 4:29 p.m. UTC | #1
On Sun, Aug 25, 2013 at 11:36 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> This was causing it to fail against latest RT kernels, with following errors:
>
>         In file included from /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/compat/include/linux/if_vlan.h:6:0,
>                          from /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/actions.c:29:
>         /home/arm/work/kernel/linaro/lng/lng.git/include/linux/if_vlan.h: In function vlan_insert_tag:
>         /home/arm/work/kernel/linaro/lng/lng.git/include/linux/if_vlan.h:197:5: error: struct sk_buff has no member named mac
>         In file included from /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/../flow.h:34:0,
>                          from /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/../datapath.h:31,
>                          from /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/actions.c:36:
>         /home/arm/work/kernel/linaro/lng/lng.git/include/net/inet_ecn.h: In function INET_ECN_set_ce:
>         /home/arm/work/kernel/linaro/lng/lng.git/include/net/inet_ecn.h:137:10: error: struct sk_buff has no member named nh
>         /home/arm/work/kernel/linaro/lng/lng.git/include/net/inet_ecn.h:142:10: error: struct sk_buff has no member named nh
>         /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/actions.c: In function __pop_vlan_tci:
>         /home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/actions.c:72:5: error: struct sk_buff has no member named mac
>         make[7]: *** [/home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux/actions.o] Error 1
>         make[6]: *** [_module_/home/arm/work/kernel/linaro/lng/openvswitch/datapath/linux] Error 2
>
> Not sure why it was added earlier but my guess is, for earlier RT kernels struct
> sk_buff had following variables mac.raw, nh.raw, h.raw instead of mac_header,
> network_header, transport_header. And so the hack to rename them in OVS code.
> But that's not the case now. RT kernel have mac_header, network_header and
> transport_header as parameter and so we don't need this macro at all.
>
> Lets get rid of it.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

This is compatibility code for older kernels so by definition it
doesn't exist in current kernels. You can't just remove it.
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 73ee5ce..f5d24b0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -238,8 +238,6 @@  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_DEFINE([HAVE_MAC_RAW])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_dst(],
                   [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], 
diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
index 461e07c..e432c85 100644
--- a/datapath/linux/compat/include/linux/skbuff.h
+++ b/datapath/linux/compat/include/linux/skbuff.h
@@ -125,12 +125,6 @@  static inline void kfree_skb_maybe_null(struct sk_buff *skb)
 #define CHECKSUM_COMPLETE CHECKSUM_HW
 #endif
 
-#ifdef HAVE_MAC_RAW
-#define mac_header mac.raw
-#define network_header nh.raw
-#define transport_header h.raw
-#endif
-
 #ifndef HAVE_SKBUFF_HEADER_HELPERS
 static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
 {