Skip to content

Commit

Permalink
datapath: Fix compilation on kernel 3.18
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
Pravin B Shelar committed Sep 22, 2015
1 parent ae09fae commit ec96e66
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
3 changes: 2 additions & 1 deletion datapath/linux/compat/include/linux/if_vlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec96e66

Please sign in to comment.