__vlan_put_tag() was renamed to vlan_insert_tag_set_proto() with
the argument list kept intact.
Upstream: 62749e ("vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto")
Signed-off-by: Thomas Graf <[email protected]>
---
acinclude.m4 | 1 +
datapath/actions.c | 2 +-
datapath/datapath.c | 2 +-
datapath/linux/compat/gso.c | 4 ++--
datapath/linux/compat/include/linux/if_vlan.h | 17 +++++++++++------
datapath/linux/compat/vxlan.c | 6 +++---
datapath/vport-geneve.c | 6 +++---
datapath/vport-gre.c | 6 +++---
datapath/vport-internal_dev.c | 6 +++---
9 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 3121b09..05dc112 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -376,6 +376,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [ADD_ALL_VLANS_CMD],
[OVS_DEFINE([HAVE_VLAN_BUG_WORKAROUND])])
+ OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_insert_tag_set_proto])
OVS_GREP_IFELSE([$KSRC/include/linux/u64_stats_sync.h],
[u64_stats_fetch_begin_irq])
diff --git a/datapath/actions.c b/datapath/actions.c
index 5a1dbe2..9a49cd5 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -292,7 +292,7 @@ static int push_vlan(struct sk_buff *skb, struct
sw_flow_key *key,
/* push down current VLAN tag */
current_tag = vlan_tx_tag_get(skb);
- if (!__vlan_put_tag(skb, skb->vlan_proto, current_tag))
+ if (!vlan_insert_tag_set_proto(skb, skb->vlan_proto,
current_tag))
return -ENOMEM;
/* Update mac_len for subsequent MPLS actions */
skb->mac_len += VLAN_HLEN;
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 3607170..ebab68c 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -428,7 +428,7 @@ static int queue_userspace_packet(struct datapath *dp,
struct sk_buff *skb,
if (!nskb)
return -ENOMEM;
- nskb = __vlan_put_tag(nskb, nskb->vlan_proto,
vlan_tx_tag_get(nskb));
+ nskb = vlan_insert_tag_set_proto(nskb, nskb->vlan_proto,
vlan_tx_tag_get(nskb));
if (!nskb)
return -ENOMEM;
diff --git a/datapath/linux/compat/gso.c b/datapath/linux/compat/gso.c
index 5079f79..56f9493 100644
--- a/datapath/linux/compat/gso.c
+++ b/datapath/linux/compat/gso.c
@@ -110,8 +110,8 @@ int rpl_dev_queue_xmit(struct sk_buff *skb)
features &= ~(NETIF_F_TSO | NETIF_F_TSO6 |
NETIF_F_UFO | NETIF_F_FSO);
- skb = __vlan_put_tag(skb, skb->vlan_proto,
- vlan_tx_tag_get(skb));
+ skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
+ vlan_tx_tag_get(skb));
if (unlikely(!skb))
return err;
vlan_set_tci(skb, 0);
diff --git a/datapath/linux/compat/include/linux/if_vlan.h
b/datapath/linux/compat/include/linux/if_vlan.h
index 730175b..616b3bf 100644
--- a/datapath/linux/compat/include/linux/if_vlan.h
+++ b/datapath/linux/compat/include/linux/if_vlan.h
@@ -5,9 +5,10 @@
#include <linux/version.h>
#include_next <linux/if_vlan.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#ifndef HAVE_VLAN_INSERT_TAG_SET_PROTO
/*
- * The behavior of __vlan_put_tag() has changed over time:
+ * The behavior of __vlan_put_tag()/vlan_insert_tag_set_proto() has changed
+ * over time:
*
* - In 2.6.26 and earlier, it adjusted both MAC and network header
* pointers. (The latter didn't make any sense.)
@@ -16,13 +17,16 @@
*
* - In 2.6.29 and later, it adjusts the MAC header pointer only.
*
+ * - In 3.19 and later, it was renamed to vlan_insert_tag_set_proto()
+ *
* This is the version from 2.6.33. We unconditionally substitute this version
* to avoid the need to guess whether the version in the kernel tree is
* acceptable.
*/
-#define __vlan_put_tag(skb, proto, tag) rpl__vlan_put_tag(skb, tag)
-
-static inline struct sk_buff *rpl__vlan_put_tag(struct sk_buff *skb, u16
vlan_tci)
+#define vlan_insert_tag_set_proto(skb, proto, vlan_tci) \
+ rpl_vlan_insert_tag_set_proto(skb, vlan_tci)
+static inline struct sk_buff *rpl_vlan_insert_tag_set_proto(struct sk_buff
*skb,
+ u16 vlan_tci)
{
struct vlan_ethhdr *veth;
@@ -46,7 +50,9 @@ static inline struct sk_buff *rpl__vlan_put_tag(struct
sk_buff *skb, u16 vlan_tc
return skb;
}
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static inline struct sk_buff *rpl___vlan_hwaccel_put_tag(struct sk_buff *skb,
__be16 vlan_proto,
u16 vlan_tci)
@@ -55,7 +61,6 @@ static inline struct sk_buff
*rpl___vlan_hwaccel_put_tag(struct sk_buff *skb,
}
#define __vlan_hwaccel_put_tag rpl___vlan_hwaccel_put_tag
-
#endif
/* All of these were introduced in a single commit preceding 2.6.33, so
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 0389b28..49d3864 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -193,9 +193,9 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
}
if (vlan_tx_tag_present(skb)) {
- if (unlikely(!__vlan_put_tag(skb,
- skb->vlan_proto,
- vlan_tx_tag_get(skb))))
+ if (unlikely(!vlan_insert_tag_set_proto(skb,
+ skb->vlan_proto,
+ vlan_tx_tag_get(skb))))
return -ENOMEM;
vlan_set_tci(skb, 0);
diff --git a/datapath/vport-geneve.c b/datapath/vport-geneve.c
index d54101e..86f90f5 100644
--- a/datapath/vport-geneve.c
+++ b/datapath/vport-geneve.c
@@ -404,9 +404,9 @@ static int geneve_send(struct vport *vport, struct sk_buff
*skb)
}
if (vlan_tx_tag_present(skb)) {
- if (unlikely(!__vlan_put_tag(skb,
- skb->vlan_proto,
- vlan_tx_tag_get(skb)))) {
+ if (unlikely(!vlan_insert_tag_set_proto(skb,
+ skb->vlan_proto,
+ vlan_tx_tag_get(skb))))
{
err = -ENOMEM;
skb = NULL;
goto err_free_rt;
diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c
index daf7fc3..53df865 100644
--- a/datapath/vport-gre.c
+++ b/datapath/vport-gre.c
@@ -175,9 +175,9 @@ static int __send(struct vport *vport, struct sk_buff *skb,
}
if (vlan_tx_tag_present(skb)) {
- if (unlikely(!__vlan_put_tag(skb,
- skb->vlan_proto,
- vlan_tx_tag_get(skb)))) {
+ if (unlikely(!vlan_insert_tag_set_proto(skb,
+ skb->vlan_proto,
+ vlan_tx_tag_get(skb))))
{
err = -ENOMEM;
skb = NULL;
goto err_free_rt;
diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
index a1c4949..997bb3f 100644
--- a/datapath/vport-internal_dev.c
+++ b/datapath/vport-internal_dev.c
@@ -250,9 +250,9 @@ static int internal_dev_recv(struct vport *vport, struct
sk_buff *skb)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
if (vlan_tx_tag_present(skb)) {
- if (unlikely(!__vlan_put_tag(skb,
- skb->vlan_proto,
- vlan_tx_tag_get(skb))))
+ if (unlikely(!vlan_insert_tag_set_proto(skb,
+ skb->vlan_proto,
+ vlan_tx_tag_get(skb))))
return 0;
if (skb->ip_summed == CHECKSUM_COMPLETE)
--
1.9.3
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev