datapath: Fix compilation on kernel 3.18
authorPravin B Shelar <pshelar@nicira.com>
Fri, 18 Sep 2015 22:23:21 +0000 (15:23 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Tue, 22 Sep 2015 21:21:25 +0000 (14:21 -0700)
Fixes following compilation error:
In file included from ovs/datapath/linux/actions.c:30: ovs/datapath/linux/compat/include/linux/if_vlan.h:65:
error: redefinition of ‘__vlan_hwaccel_push_inside’ include/linux/if_vlan.h:353: note: previous definition of
‘__vlan_hwaccel_push_inside’ was here ovs/datapath/linux/compat/include/linux/if_vlan.h:83:

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
.travis.yml
acinclude.m4
datapath/linux/compat/include/linux/if_vlan.h

index f4b9188..c721f53 100644 (file)
@@ -16,7 +16,7 @@ env:
   - KERNEL=4.0.9
   - KERNEL=3.17.7 DPDK=1
   - KERNEL=3.17.7 DPDK=1 OPTS="--enable-shared"
-  - KERNEL=3.17.7
+  - KERNEL=3.18.21
   - KERNEL=3.16.7
   - KERNEL=3.14.27
   - KERNEL=3.12.35
index beb320b..df3e75e 100644 (file)
@@ -323,6 +323,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/etherdevice.h], [ether_addr_copy])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_set_encap_proto])
+  OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_hwaccel_push_inside])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast])
   OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [proto_ports_offset])
index 05c2876..060bb62 100644 (file)
@@ -52,7 +52,8 @@ static inline struct sk_buff *rpl_vlan_insert_tag_set_proto(struct sk_buff *skb,
 }
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
+#ifndef HAVE_VLAN_HWACCEL_PUSH_INSIDE
+
 /*
  * __vlan_hwaccel_push_inside - pushes vlan tag to the payload
  * @skb: skbuff to tag