]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto
authorJiri Pirko <jiri@resnulli.us>
Wed, 19 Nov 2014 13:04:58 +0000 (14:04 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 27 Apr 2015 20:48:33 +0000 (16:48 -0400)
[ Upstream commit 62749e2cb3c4a7da3eaa5c01a7e787aebeff8536 ]

Name fits better. Plus there's going to be introduced
__vlan_insert_tag later on.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/bonding/bond_main.c
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/vxlan.c
include/linux/if_vlan.h
net/bridge/br_vlan.c
net/core/dev.c
net/core/netpoll.c
net/ipv4/geneve.c
net/openvswitch/actions.c
net/openvswitch/datapath.c
net/openvswitch/vport-gre.c

index 26764e7667d83086f6ee2a4219419cbbbebaa861..1cc06c0e3e9286377d0e819c43b65d8ae133d765 100644 (file)
@@ -2143,8 +2143,8 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op,
 
                netdev_dbg(slave_dev, "inner tag: proto %X vid %X\n",
                           ntohs(outer_tag->vlan_proto), tags->vlan_id);
-               skb = __vlan_put_tag(skb, tags->vlan_proto,
-                                    tags->vlan_id);
+               skb = vlan_insert_tag_set_proto(skb, tags->vlan_proto,
+                                               tags->vlan_id);
                if (!skb) {
                        net_err_ratelimited("failed to insert inner VLAN tag\n");
                        return;
index d2975fa7e549bea8c3785ecf180e3fd7fb941105..e51faf0ca98974aaab2b1ce0093ba2f93c84bff5 100644 (file)
@@ -887,7 +887,8 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
        }
 
        if (vlan_tag) {
-               skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
+               skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
+                                               vlan_tag);
                if (unlikely(!skb))
                        return skb;
                skb->vlan_tci = 0;
@@ -896,7 +897,8 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
        /* Insert the outer VLAN, if any */
        if (adapter->qnq_vid) {
                vlan_tag = adapter->qnq_vid;
-               skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
+               skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
+                                               vlan_tag);
                if (unlikely(!skb))
                        return skb;
                if (skip_hw_vlan)
index 42b2d6a56d0522801d29632a7ddefec0b628ec08..aa7b5af6293ef9691f541f035c261f388384040b 100644 (file)
@@ -1594,9 +1594,9 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs,
                return err;
 
        if (vlan_tx_tag_present(skb)) {
-               if (WARN_ON(!__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 (WARN_ON(!skb))
                        return -ENOMEM;
 
                skb->vlan_tci = 0;
@@ -1638,9 +1638,9 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
                return err;
 
        if (vlan_tx_tag_present(skb)) {
-               if (WARN_ON(!__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 (WARN_ON(!skb))
                        return -ENOMEM;
 
                skb->vlan_tci = 0;
index 2b1283245b568601038183f6312922c7736ba93b..309a06042d0ba0b7f2494a95ed6cbbce45c02ae5 100644 (file)
@@ -320,8 +320,9 @@ static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb,
 }
 
 /**
- * __vlan_put_tag - regular VLAN tag inserting
+ * vlan_insert_tag_set_proto - regular VLAN tag inserting
  * @skb: skbuff to tag
+ * @vlan_proto: VLAN encapsulation protocol
  * @vlan_tci: VLAN TCI to insert
  *
  * Inserts the VLAN tag into @skb as part of the payload
@@ -330,8 +331,9 @@ static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb,
  * Following the skb_unshare() example, in case of error, the calling function
  * doesn't have to worry about freeing the original skb.
  */
-static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb,
-                                            __be16 vlan_proto, u16 vlan_tci)
+static inline struct sk_buff *vlan_insert_tag_set_proto(struct sk_buff *skb,
+                                                       __be16 vlan_proto,
+                                                       u16 vlan_tci)
 {
        skb = vlan_insert_tag(skb, vlan_proto, vlan_tci);
        if (skb)
index 150048fb99b08eeeb25aac140721b973731ebf61..97b8ddf573634b3d7fe9a40979ea5db0c3e01377 100644 (file)
@@ -199,8 +199,8 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
                if (skb->vlan_proto != proto) {
                        /* Protocol-mismatch, empty out vlan_tci for new tag */
                        skb_push(skb, ETH_HLEN);
-                       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 false;
 
index 044a194d51a2cf2d25bc40a6a1f0eb96786e4903..8a57104a17dd740dfd8294dfe1652f07db96dfe4 100644 (file)
@@ -2664,8 +2664,8 @@ static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb,
 {
        if (vlan_tx_tag_present(skb) &&
            !vlan_hw_offload_capable(features, skb->vlan_proto)) {
-               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 (skb)
                        skb->vlan_tci = 0;
        }
index e6645b4f330af1d16607ca0d6d9c9c95fd163dc6..65d372384a3fd2b6881a92b358ad8ac75292f45d 100644 (file)
@@ -79,8 +79,8 @@ static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev,
 
        if (vlan_tx_tag_present(skb) &&
            !vlan_hw_offload_capable(features, skb->vlan_proto)) {
-               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)) {
                        /* This is actually a packet drop, but we
                         * don't want the code that calls this
index 2caa6ad965a6c9b0e72326a55cfacb96079ba104..6cdcd8cbb90248e212718242d2a4db7f332d9492 100644 (file)
@@ -132,12 +132,11 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
                return err;
 
        if (vlan_tx_tag_present(skb)) {
-               if (unlikely(!__vlan_put_tag(skb,
-                                            skb->vlan_proto,
-                                            vlan_tx_tag_get(skb)))) {
-                       err = -ENOMEM;
-                       return err;
-               }
+               skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
+                                               vlan_tx_tag_get(skb));
+               if (unlikely(!skb)
+                       return -ENOMEM;
+
                skb->vlan_tci = 0;
        }
 
index 8c4229b11c34c617a81e58dcdb1a4a6034fd064c..4107eae4f45266887ece0f8d3966a1bb9485ed4d 100644 (file)
@@ -184,7 +184,9 @@ static int push_vlan(struct sk_buff *skb, const struct ovs_action_push_vlan *vla
                /* push down current VLAN tag */
                current_tag = vlan_tx_tag_get(skb);
 
-               if (!__vlan_put_tag(skb, skb->vlan_proto, current_tag))
+               skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
+                                               current_tag);
+               if (!skb)
                        return -ENOMEM;
 
                if (skb->ip_summed == CHECKSUM_COMPLETE)
index 68ccddb5e2c4c5d222dcaa3957416bc5e97f101b..c0ef691c150a0280c410d5288072afadef53e16b 100644 (file)
@@ -423,7 +423,8 @@ 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;
 
index 108b82da2fd94169bab809df9d771232fa0c53b5..d2f2658e23481699a212d455d35106132869fa1c 100644 (file)
@@ -173,9 +173,9 @@ static int gre_tnl_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)))) {
+               skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
+                                               vlan_tx_tag_get(skb));
+               if (unlikely(!skb) {
                        err = -ENOMEM;
                        goto err_free_rt;
                }