diff mbox

[ovs-dev,1/3] datapath: Fix compilation on kernel 3.18

Message ID 1442615001-2339-1-git-send-email-pshelar@nicira.com
State Accepted
Headers show

Commit Message

Pravin B Shelar Sept. 18, 2015, 10:23 p.m. UTC
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>
---
 .travis.yml                                   |    2 +-
 acinclude.m4                                  |    1 +
 datapath/linux/compat/include/linux/if_vlan.h |    3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

Comments

Jesse Gross Sept. 19, 2015, 1:15 a.m. UTC | #1
On Fri, Sep 18, 2015 at 3:23 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
> 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>
Pravin B Shelar Sept. 22, 2015, 9:25 p.m. UTC | #2
On Fri, Sep 18, 2015 at 6:15 PM, Jesse Gross <jesse@nicira.com> wrote:
> On Fri, Sep 18, 2015 at 3:23 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>> 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>

Thanks for review.
I pushed patch to master.
Simon Horman Nov. 10, 2015, 6:03 a.m. UTC | #3
On Tue, Sep 22, 2015 at 02:25:26PM -0700, Pravin Shelar wrote:
> On Fri, Sep 18, 2015 at 6:15 PM, Jesse Gross <jesse@nicira.com> wrote:
> > On Fri, Sep 18, 2015 at 3:23 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
> >> 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>
> 
> Thanks for review.
> I pushed patch to master.

This seems to be required on branch-2.4 too.
Could you consider back-porting it to there?
Pravin B Shelar Nov. 10, 2015, 4:05 p.m. UTC | #4
On Tue, Nov 10, 2015 at 11:33 AM, Simon Horman
<simon.horman@netronome.com> wrote:
> On Tue, Sep 22, 2015 at 02:25:26PM -0700, Pravin Shelar wrote:
>> On Fri, Sep 18, 2015 at 6:15 PM, Jesse Gross <jesse@nicira.com> wrote:
>> > On Fri, Sep 18, 2015 at 3:23 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>> >> 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>
>>
>> Thanks for review.
>> I pushed patch to master.
>
> This seems to be required on branch-2.4 too.
> Could you consider back-porting it to there?
>

Sure, I pushed the patch to branch-2.4

Thanks.
Simon Horman Nov. 11, 2015, 1:39 a.m. UTC | #5
On Tue, Nov 10, 2015 at 09:35:10PM +0530, Pravin Shelar wrote:
> On Tue, Nov 10, 2015 at 11:33 AM, Simon Horman
> <simon.horman@netronome.com> wrote:
> > On Tue, Sep 22, 2015 at 02:25:26PM -0700, Pravin Shelar wrote:
> >> On Fri, Sep 18, 2015 at 6:15 PM, Jesse Gross <jesse@nicira.com> wrote:
> >> > On Fri, Sep 18, 2015 at 3:23 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
> >> >> 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>
> >>
> >> Thanks for review.
> >> I pushed patch to master.
> >
> > This seems to be required on branch-2.4 too.
> > Could you consider back-porting it to there?
> >
> 
> Sure, I pushed the patch to branch-2.4

Great, thanks!
diff mbox

Patch

diff --git a/.travis.yml b/.travis.yml
index f4b9188..c721f53 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/acinclude.m4 b/acinclude.m4
index beb320b..df3e75e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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])
diff --git a/datapath/linux/compat/include/linux/if_vlan.h b/datapath/linux/compat/include/linux/if_vlan.h
index 05c2876..060bb62 100644
--- a/datapath/linux/compat/include/linux/if_vlan.h
+++ b/datapath/linux/compat/include/linux/if_vlan.h
@@ -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