Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62749e2c authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto



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

Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4bef1b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2146,7 +2146,7 @@ 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,
		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");
+4 −2
Original line number Diff line number Diff line
@@ -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)
+6 −6
Original line number Diff line number Diff line
@@ -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;
+5 −3
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ 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,
			skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
							vlan_tx_tag_get(skb));
			if (unlikely(!skb))
				return false;
Loading