X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Flinux%2Fif_vlan.h;h=b8b1961f7a3173ea7c73ffc2e5c685f976e96737;hb=d923a695edf35ac45854aa374136e991877c7d57;hp=326abb276e2fba3a6b8165aee883027bb961a27d;hpb=ceb176fdb72bb7ce90debc66e1eeb1d25823d30a;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/include/linux/if_vlan.h b/datapath/linux/compat/include/linux/if_vlan.h index 326abb276..b8b1961f7 100644 --- a/datapath/linux/compat/include/linux/if_vlan.h +++ b/datapath/linux/compat/include/linux/if_vlan.h @@ -1,8 +1,9 @@ #ifndef __LINUX_IF_VLAN_WRAPPER_H #define __LINUX_IF_VLAN_WRAPPER_H 1 -#include_next #include +#include +#include_next /* * The behavior of __vlan_put_tag() has changed over time: @@ -30,7 +31,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN); /* Move the mac addresses to the beginning of the new header. */ - memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); + memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); skb->mac_header -= VLAN_HLEN; /* first, the ethernet type */ @@ -54,8 +55,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) #define VLAN_TAG_PRESENT VLAN_CFI_MASK #endif -/* This function is not exported from kernel. OVS Upstreaming patch will - * fix that. */ +#ifndef HAVE_VLAN_SET_ENCAP_PROTO static inline void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr) { __be16 proto; @@ -88,4 +88,5 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vh */ skb->protocol = htons(ETH_P_802_2); } +#endif #endif /* linux/if_vlan.h wrapper */