Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / datapath / vlan.h
index aee5551..13ae6a7 100644 (file)
  * equivalent to those on 2.6.33+.
  */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-#define NEED_VLAN_FIELD
-#endif
-
-#ifndef NEED_VLAN_FIELD
-static inline void vlan_copy_skb_tci(struct sk_buff *skb) { }
-
 static inline u16 vlan_get_tci(struct sk_buff *skb)
 {
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
@@ -69,37 +62,4 @@ static inline void vlan_set_tci(struct sk_buff *skb, u16 vlan_tci)
 #endif
        skb->vlan_tci = vlan_tci;
 }
-#else
-void vlan_copy_skb_tci(struct sk_buff *skb);
-u16 vlan_get_tci(struct sk_buff *skb);
-void vlan_set_tci(struct sk_buff *skb, u16 vlan_tci);
-
-#undef vlan_tx_tag_present
-bool vlan_tx_tag_present(struct sk_buff *skb);
-
-#undef vlan_tx_tag_get
-u16 vlan_tx_tag_get(struct sk_buff *skb);
-
-#define __vlan_hwaccel_put_tag rpl__vlan_hwaccel_put_tag
-struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, u16 vlan_tci);
-#endif /* NEED_VLAN_FIELD */
-
-static inline int vlan_deaccel_tag(struct sk_buff *skb)
-{
-       if (!vlan_tx_tag_present(skb))
-               return 0;
-
-       skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb));
-       if (unlikely(!skb))
-               return -ENOMEM;
-
-       if (get_ip_summed(skb) == OVS_CSUM_COMPLETE)
-               skb->csum = csum_add(skb->csum,
-                                    csum_partial(skb->data + (2 * ETH_ALEN),
-                                                 VLAN_HLEN, 0));
-
-       vlan_set_tci(skb, 0);
-       return 0;
-}
-
 #endif /* vlan.h */