]> git.karo-electronics.de Git - linux-beck.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Nov 2014 19:20:17 +0000 (14:20 -0500)
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>
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 e26c6823203280ab1298c12460140b9a633949ac..c1d7da427a3e209ab5f6bfa275b3b0f904996f50 100644 (file)
@@ -2146,8 +2146,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 54160cc62656adc034ec24f5f75007bf0e27d16b..d02fbc7694ea73ba8f958ee5a00807d1c663b15f 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 23b1e8c0d547517edb6d8e124bfccd3e63c8a677..bb8fbab438e83623bed2922fb69d3650091dbc80 100644 (file)
@@ -1600,9 +1600,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;
@@ -1644,9 +1644,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 75b70a5e4a6d5b800ad02571c6a2cb34ec944e5b..46e4a15b9b550fee141125a5d4720c3cda9e1b4a 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 1ab168e0fdf72a251c4ce990dd5aae67cc02bac2..3611e60df407f13a6fd59645efa6579bb4044a41 100644 (file)
@@ -2645,8 +2645,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 31802afce34f1f4316649c9489aee5a57b22bcc7..fd430a6a1c377c884341381b43d0b1ee6c7d6256 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 749a30163071effc9219e370000fcbdad51b80b6..426b9131ede03c116bc5d4f96141f0d0cd84fcf0 100644 (file)
@@ -287,7 +287,9 @@ 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))
+               skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
+                                               current_tag);
+               if (!skb)
                        return -ENOMEM;
                /* Update mac_len for subsequent MPLS actions */
                skb->mac_len += VLAN_HLEN;
index ab141d49bb9d9a9c76df121f56816733bc5d9e3b..c63e60e4d9476dd6db27503d756f4cbabc7efa3a 100644 (file)
@@ -425,7 +425,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 8e61a5c6ae7c8f00c4ae9c2d4278035cd0481635..777cd8c71d536b93906b011ae3e05493e6acbf1e 100644 (file)
@@ -176,9 +176,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;
                }