net: rename vlan_tx_* helpers since "tx" is misleading there
authorJiri Pirko <jiri@resnulli.us>
Tue, 13 Jan 2015 16:13:44 +0000 (17:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2015 22:51:08 +0000 (17:51 -0500)
The same macros are used for rx as well. So rename it.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
77 files changed:
Documentation/networking/filter.txt
drivers/infiniband/hw/nes/nes_nic.c
drivers/net/ethernet/3com/typhoon.c
drivers/net/ethernet/alteon/acenic.c
drivers/net/ethernet/amd/amd8111e.c
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/atheros/atl1c/atl1c_main.c
drivers/net/ethernet/atheros/atl1e/atl1e_main.c
drivers/net/ethernet/atheros/atlx/atl1.c
drivers/net/ethernet/atheros/atlx/atl2.c
drivers/net/ethernet/broadcom/bnx2.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/brocade/bna/bnad.c
drivers/net/ethernet/chelsio/cxgb/sge.c
drivers/net/ethernet/chelsio/cxgb3/sge.c
drivers/net/ethernet/chelsio/cxgb4/sge.c
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
drivers/net/ethernet/cisco/enic/enic_main.c
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/ibm/ehea/ehea_main.c
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/fm10k/fm10k_main.c
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igbvf/netdev.c
drivers/net/ethernet/intel/ixgb/ixgb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/jme.c
drivers/net/ethernet/marvell/sky2.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/natsemi/ns83820.c
drivers/net/ethernet/neterion/s2io.c
drivers/net/ethernet/neterion/vxge/vxge-main.c
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
drivers/net/ethernet/qlogic/qlge/qlge_main.c
drivers/net/ethernet/realtek/8139cp.c
drivers/net/ethernet/realtek/r8169.c
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
drivers/net/ethernet/tehuti/tehuti.c
drivers/net/ethernet/via/via-rhine.c
drivers/net/ethernet/via/via-velocity.c
drivers/net/macvtap.c
drivers/net/tun.c
drivers/net/usb/r8152.c
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vxlan.c
drivers/s390/net/qeth_l3_main.c
drivers/vhost/net.c
include/linux/if_vlan.h
include/net/pkt_sched.h
include/trace/events/net.h
net/8021q/vlan_core.c
net/bridge/br_netfilter.c
net/bridge/br_private.h
net/bridge/br_vlan.c
net/bridge/netfilter/ebt_vlan.c
net/bridge/netfilter/ebtables.c
net/core/dev.c
net/core/netpoll.c
net/core/skbuff.c
net/ipv4/geneve.c
net/openvswitch/actions.c
net/openvswitch/datapath.c
net/openvswitch/flow.c
net/openvswitch/vport-gre.c
net/openvswitch/vport.c
net/packet/af_packet.c
net/sched/em_meta.c
net/wireless/util.c

index 58d08f8d8d8025dbe83481daa0fe76889216910e..9930ecfbb4658f7bd93969b52440e49eeb753de2 100644 (file)
@@ -279,8 +279,8 @@ Possible BPF extensions are shown in the following table:
   hatype                                skb->dev->type
   rxhash                                skb->hash
   cpu                                   raw_smp_processor_id()
-  vlan_tci                              vlan_tx_tag_get(skb)
-  vlan_pr                               vlan_tx_tag_present(skb)
+  vlan_tci                              skb_vlan_tag_get(skb)
+  vlan_pr                               skb_vlan_tag_present(skb)
   rand                                  prandom_u32()
 
 These extensions can also be prefixed with '#'.
index 49eb5111d2cd0b96c2f8ce8e4260e1fbfd5497cd..70acda91eb2a934e79e999a1a3297d92a2148ae2 100644 (file)
@@ -373,11 +373,11 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
        wqe_fragment_length = (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
 
        /* setup the VLAN tag if present */
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n",
-                               netdev->name, vlan_tx_tag_get(skb));
+                               netdev->name, skb_vlan_tag_get(skb));
                wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE;
-               wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb);
+               wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb);
        } else
                wqe_misc = 0;
 
@@ -576,11 +576,12 @@ tso_sq_no_longer_full:
                                wqe_fragment_length =
                                                (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
                                /* setup the VLAN tag if present */
-                               if (vlan_tx_tag_present(skb)) {
+                               if (skb_vlan_tag_present(skb)) {
                                        nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n",
-                                                       netdev->name, vlan_tx_tag_get(skb) );
+                                                       netdev->name,
+                                                 skb_vlan_tag_get(skb));
                                        wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE;
-                                       wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb);
+                                       wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb);
                                } else
                                        wqe_misc = 0;
 
index dede43f4ce095bbea6a85923891acae0e704563d..8f8418d2ac4ad07016c37e6d5cb255e2b9709b85 100644 (file)
@@ -769,11 +769,11 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
                first_txd->processFlags |= TYPHOON_TX_PF_IP_CHKSUM;
        }
 
-       if(vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                first_txd->processFlags |=
                    TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY;
                first_txd->processFlags |=
-                   cpu_to_le32(htons(vlan_tx_tag_get(skb)) <<
+                   cpu_to_le32(htons(skb_vlan_tag_get(skb)) <<
                                TYPHOON_TX_PF_VLAN_TAG_SHIFT);
        }
 
index b68074803de32d54accdf919fe5cda7ca025ecb2..b90a26b13fdf22a61b08b311a4f53dbd77f81a6b 100644 (file)
@@ -2429,9 +2429,9 @@ restart:
                flagsize = (skb->len << 16) | (BD_FLG_END);
                if (skb->ip_summed == CHECKSUM_PARTIAL)
                        flagsize |= BD_FLG_TCP_UDP_SUM;
-               if (vlan_tx_tag_present(skb)) {
+               if (skb_vlan_tag_present(skb)) {
                        flagsize |= BD_FLG_VLAN_TAG;
-                       vlan_tag = vlan_tx_tag_get(skb);
+                       vlan_tag = skb_vlan_tag_get(skb);
                }
                desc = ap->tx_ring + idx;
                idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap);
@@ -2450,9 +2450,9 @@ restart:
                flagsize = (skb_headlen(skb) << 16);
                if (skb->ip_summed == CHECKSUM_PARTIAL)
                        flagsize |= BD_FLG_TCP_UDP_SUM;
-               if (vlan_tx_tag_present(skb)) {
+               if (skb_vlan_tag_present(skb)) {
                        flagsize |= BD_FLG_VLAN_TAG;
-                       vlan_tag = vlan_tx_tag_get(skb);
+                       vlan_tag = skb_vlan_tag_get(skb);
                }
 
                ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag);
index 841e6558db682757025e6284cd37d12c81e24039..4c2ae22217804fd8ce8e6cc8a27c6cf2855abba2 100644 (file)
@@ -1299,11 +1299,11 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
        lp->tx_ring[tx_index].tx_flags = 0;
 
 #if AMD8111E_VLAN_TAG_USED
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                lp->tx_ring[tx_index].tag_ctrl_cmd |=
                                cpu_to_le16(TCC_VLAN_INSERT);
                lp->tx_ring[tx_index].tag_ctrl_info =
-                               cpu_to_le16(vlan_tx_tag_get(skb));
+                               cpu_to_le16(skb_vlan_tag_get(skb));
 
        }
 #endif
index 7bb5f07dbeef3e806174047cc883e3fb6ca149c3..2ba1dd22ad648b55545a1ee924a204895484df93 100644 (file)
@@ -1165,8 +1165,8 @@ static void xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata,
 
 static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet)
 {
-       if (vlan_tx_tag_present(skb))
-               packet->vlan_ctag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb))
+               packet->vlan_ctag = skb_vlan_tag_get(skb);
 }
 
 static int xgbe_prep_tso(struct sk_buff *skb, struct xgbe_packet_data *packet)
@@ -1247,9 +1247,9 @@ static void xgbe_packet_info(struct xgbe_prv_data *pdata,
                XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES,
                               CSUM_ENABLE, 1);
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                /* VLAN requires an extra descriptor if tag is different */
-               if (vlan_tx_tag_get(skb) != ring->tx.cur_vlan_ctag)
+               if (skb_vlan_tag_get(skb) != ring->tx.cur_vlan_ctag)
                        /* We can share with the TSO context descriptor */
                        if (!context_desc) {
                                context_desc = 1;
index c9946c6c119e31f24b50a4337bdb770826ae8cae..587f63e87588f73a3e310066f3fd7494d1259e3f 100644 (file)
@@ -2235,8 +2235,8 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
                return NETDEV_TX_OK;
        }
 
-       if (unlikely(vlan_tx_tag_present(skb))) {
-               u16 vlan = vlan_tx_tag_get(skb);
+       if (unlikely(skb_vlan_tag_present(skb))) {
+               u16 vlan = skb_vlan_tag_get(skb);
                __le16 tag;
 
                vlan = cpu_to_le16(vlan);
index c88abf5b64154c90dbcaeb536581b8da839b1713..59a03a193e8354285f838f6f47c3bc081cc18bdf 100644 (file)
@@ -1892,8 +1892,8 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
 
        tpd = atl1e_get_tpd(adapter);
 
-       if (vlan_tx_tag_present(skb)) {
-               u16 vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               u16 vlan_tag = skb_vlan_tag_get(skb);
                u16 atl1e_vlan_tag;
 
                tpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
index 2c8f398aeda9228dc65255cd642759b8e557b256..eca1d113fee187ccb310fbd6c3ba2c4b535a9114 100644 (file)
@@ -2415,8 +2415,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
                (u16) atomic_read(&tpd_ring->next_to_use));
        memset(ptpd, 0, sizeof(struct tx_packet_desc));
 
-       if (vlan_tx_tag_present(skb)) {
-               vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               vlan_tag = skb_vlan_tag_get(skb);
                vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
                        ((vlan_tag >> 9) & 0x8);
                ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
index 482a7cabb0a1421802e66dce856ea94925c0dd15..46a535318c7af64ea586baf230067f9e2d4ade5b 100644 (file)
@@ -887,8 +887,8 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
                offset = ((u32)(skb->len-copy_len + 3) & ~3);
        }
 #ifdef NETIF_F_HW_VLAN_CTAG_TX
-       if (vlan_tx_tag_present(skb)) {
-               u16 vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               u16 vlan_tag = skb_vlan_tag_get(skb);
                vlan_tag = (vlan_tag << 4) |
                        (vlan_tag >> 13) |
                        ((vlan_tag >> 9) & 0x8);
index 823d01c5684caf3373d51ee09fe615a0e8e7a07b..02bf0b86995b8e5caac66cffd174208349fce519 100644 (file)
@@ -6597,9 +6597,9 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
                vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM;
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                vlan_tag_flags |=
-                       (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
+                       (TX_BD_FLAGS_VLAN_TAG | (skb_vlan_tag_get(skb) << 16));
        }
 
        if ((mss = skb_shinfo(skb)->gso_size)) {
index 1d1147c93d5972147a9aa17650eeaadb0dda7066..b51a18a09d4d1c2e398ead730a68a9c76f0121a2 100644 (file)
@@ -3865,9 +3865,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
           "sending pkt %u @%p  next_idx %u  bd %u @%p\n",
           pkt_prod, tx_buf, txdata->tx_pkt_prod, bd_prod, tx_start_bd);
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_start_bd->vlan_or_ethertype =
-                   cpu_to_le16(vlan_tx_tag_get(skb));
+                   cpu_to_le16(skb_vlan_tag_get(skb));
                tx_start_bd->bd_flags.as_bitfield |=
                    (X_ETH_OUTBAND_VLAN << ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT);
        } else {
index 356bd5b022a5d57027ea28a76ea67ece3dea3de5..4cf43bfbc9557932654ba003fa565e1353ac401c 100644 (file)
@@ -8002,9 +8002,9 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
            !mss && skb->len > VLAN_ETH_FRAME_LEN)
                base_flags |= TXD_FLAG_JMB_PKT;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                base_flags |= TXD_FLAG_VLAN;
-               vlan = vlan_tx_tag_get(skb);
+               vlan = skb_vlan_tag_get(skb);
        }
 
        if ((unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) &&
index 323721838cf93e7d75e498cd98ab2cf1d78a3233..7714d7790089cc1c35aa37511d07ccce7d27dfa3 100644 (file)
@@ -2824,8 +2824,8 @@ bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb,
        u32 gso_size;
        u16 vlan_tag = 0;
 
-       if (vlan_tx_tag_present(skb)) {
-               vlan_tag = (u16)vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               vlan_tag = (u16)skb_vlan_tag_get(skb);
                flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN);
        }
        if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags)) {
index babe2a915b0050936edcecf86675d43610794a70..526ea74e82d9590b248530148a4a0776411d608d 100644 (file)
@@ -1860,9 +1860,9 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
        cpl->iff = dev->if_port;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                cpl->vlan_valid = 1;
-               cpl->vlan = htons(vlan_tx_tag_get(skb));
+               cpl->vlan = htons(skb_vlan_tag_get(skb));
                st->vlan_insert++;
        } else
                cpl->vlan_valid = 0;
index 3dfcf600fcc68bee74b41a51942c283f7bf191aa..d6aa602f168d776cd1450fb10c8fdeb6c0118ae3 100644 (file)
@@ -1148,8 +1148,8 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb,
        cpl->len = htonl(skb->len);
        cntrl = V_TXPKT_INTF(pi->port_id);
 
-       if (vlan_tx_tag_present(skb))
-               cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(vlan_tx_tag_get(skb));
+       if (skb_vlan_tag_present(skb))
+               cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(skb_vlan_tag_get(skb));
 
        tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size);
        if (tso_info) {
@@ -1282,7 +1282,7 @@ netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
                qs->port_stats[SGE_PSTAT_TX_CSUM]++;
        if (skb_shinfo(skb)->gso_size)
                qs->port_stats[SGE_PSTAT_TSO]++;
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                qs->port_stats[SGE_PSTAT_VLANINS]++;
 
        /*
index ca42e2e9dec9fce089ddca43b25cab73f044e9b9..619156112b21a2a0ac4ceff37cb77a0bbf7da0b3 100644 (file)
@@ -1154,9 +1154,9 @@ out_free: dev_kfree_skb_any(skb);
                        cntrl = TXPKT_L4CSUM_DIS | TXPKT_IPCSUM_DIS;
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                q->vlan_ins++;
-               cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb));
+               cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb));
        }
 
        cpl->ctrl0 = htonl(TXPKT_OPCODE(CPL_TX_PKT_XT) |
index 4424277a7e4db789a89298a24dc32214ce5271e4..0545f0de1c52be282af53d6a5f03916f93ad7013 100644 (file)
@@ -1326,9 +1326,9 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
         * If there's a VLAN tag present, add that to the list of things to
         * do in this Work Request.
         */
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                txq->vlan_ins++;
-               cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb));
+               cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb));
        }
 
        /*
index 9a952df6606e220a0c7c2415e119f486cf8fac0d..0535f6fbdc717afe9ed132fd549a9dca26fad1aa 100644 (file)
@@ -520,10 +520,10 @@ static inline void enic_queue_wq_skb(struct enic *enic,
        int loopback = 0;
        int err;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                /* VLAN tag from trunking driver */
                vlan_tag_insert = 1;
-               vlan_tag = vlan_tx_tag_get(skb);
+               vlan_tag = skb_vlan_tag_get(skb);
        } else if (enic->loop_enable) {
                vlan_tag = enic->loop_tag;
                loopback = 1;
index 37a26b0b7e33162ecdff92435d3aa7b2d06b600c..ed46610e545327678ca2a4ee67a5e0644586767c 100644 (file)
@@ -694,7 +694,7 @@ static inline u16 be_get_tx_vlan_tag(struct be_adapter *adapter,
        u8 vlan_prio;
        u16 vlan_tag;
 
-       vlan_tag = vlan_tx_tag_get(skb);
+       vlan_tag = skb_vlan_tag_get(skb);
        vlan_prio = (vlan_tag & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
        /* If vlan priority provided by OS is NOT in available bmap */
        if (!(adapter->vlan_prio_bmap & (1 << vlan_prio)))
@@ -745,7 +745,7 @@ static void wrb_fill_hdr(struct be_adapter *adapter, struct be_eth_hdr_wrb *hdr,
                        SET_TX_WRB_HDR_BITS(udpcs, hdr, 1);
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                SET_TX_WRB_HDR_BITS(vlan, hdr, 1);
                vlan_tag = be_get_tx_vlan_tag(adapter, skb);
                SET_TX_WRB_HDR_BITS(vlan_tag, hdr, vlan_tag);
@@ -864,7 +864,7 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
        if (unlikely(!skb))
                return skb;
 
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                vlan_tag = be_get_tx_vlan_tag(adapter, skb);
 
        if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
@@ -923,7 +923,7 @@ static bool be_ipv6_exthdr_check(struct sk_buff *skb)
 
 static int be_vlan_tag_tx_chk(struct be_adapter *adapter, struct sk_buff *skb)
 {
-       return vlan_tx_tag_present(skb) || adapter->pvid || adapter->qnq_vid;
+       return skb_vlan_tag_present(skb) || adapter->pvid || adapter->qnq_vid;
 }
 
 static int be_ipv6_tx_stall_chk(struct be_adapter *adapter, struct sk_buff *skb)
@@ -946,7 +946,7 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter,
        eth_hdr_len = ntohs(skb->protocol) == ETH_P_8021Q ?
                                                VLAN_ETH_HLEN : ETH_HLEN;
        if (skb->len <= 60 &&
-           (lancer_chip(adapter) || vlan_tx_tag_present(skb)) &&
+           (lancer_chip(adapter) || skb_vlan_tag_present(skb)) &&
            is_ipv4_pkt(skb)) {
                ip = (struct iphdr *)ip_hdr(skb);
                pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len));
@@ -964,7 +964,7 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter,
         * Manually insert VLAN in pkt.
         */
        if (skb->ip_summed != CHECKSUM_PARTIAL &&
-           vlan_tx_tag_present(skb)) {
+           skb_vlan_tag_present(skb)) {
                skb = be_insert_vlan_in_pkt(adapter, skb, skip_hw_vlan);
                if (unlikely(!skb))
                        goto err;
index e54b1e39f9b4fd28e967ceac85f9a460da11da16..93ff846e96f12b08181a7c59ed8afabc53369cd4 100644 (file)
@@ -2170,7 +2170,7 @@ static inline void gfar_tx_checksum(struct sk_buff *skb, struct txfcb *fcb,
 void inline gfar_tx_vlan(struct sk_buff *skb, struct txfcb *fcb)
 {
        fcb->flags |= TXFCB_VLN;
-       fcb->vlctl = vlan_tx_tag_get(skb);
+       fcb->vlctl = skb_vlan_tag_get(skb);
 }
 
 static inline struct txbd8 *skip_txbd(struct txbd8 *bdp, int stride,
@@ -2230,7 +2230,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
        regs = tx_queue->grp->regs;
 
        do_csum = (CHECKSUM_PARTIAL == skb->ip_summed);
-       do_vlan = vlan_tx_tag_present(skb);
+       do_vlan = skb_vlan_tag_present(skb);
        do_tstamp = (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
                    priv->hwts_tx_en;
 
index 566b17db135a306a2bb8eea0ce167a70e6e165f4..e8a1adb7a96255bf8da1baa87b29514527c2764d 100644 (file)
@@ -2064,9 +2064,9 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
        memset(swqe, 0, SWQE_HEADER_SIZE);
        atomic_dec(&pr->swqe_avail);
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                swqe->tx_control |= EHEA_SWQE_VLAN_INSERT;
-               swqe->vlan_tag = vlan_tx_tag_get(skb);
+               swqe->vlan_tag = skb_vlan_tag_get(skb);
        }
 
        pr->tx_packets++;
index 83140cbb5f0119d6ab478e3491a44c4813f152f7..9242982db3e09bdbc87043498219f81919dcb055 100644 (file)
@@ -3226,9 +3226,10 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
                return NETDEV_TX_BUSY;
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_flags |= E1000_TX_FLAGS_VLAN;
-               tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
+               tx_flags |= (skb_vlan_tag_get(skb) <<
+                            E1000_TX_FLAGS_VLAN_SHIFT);
        }
 
        first = tx_ring->next_to_use;
index 332a298e95b551f5d4197274fbb906308a00a0b0..38cb586b1bf42fa7a50e19f3e650e8c139788820 100644 (file)
@@ -5463,8 +5463,8 @@ static int e1000_transfer_dhcp_info(struct e1000_adapter *adapter,
        struct e1000_hw *hw = &adapter->hw;
        u16 length, offset;
 
-       if (vlan_tx_tag_present(skb) &&
-           !((vlan_tx_tag_get(skb) == adapter->hw.mng_cookie.vlan_id) &&
+       if (skb_vlan_tag_present(skb) &&
+           !((skb_vlan_tag_get(skb) == adapter->hw.mng_cookie.vlan_id) &&
              (adapter->hw.mng_cookie.status &
               E1000_MNG_DHCP_COOKIE_STATUS_VLAN)))
                return 0;
@@ -5603,9 +5603,10 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
        if (e1000_maybe_stop_tx(tx_ring, count + 2))
                return NETDEV_TX_BUSY;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_flags |= E1000_TX_FLAGS_VLAN;
-               tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
+               tx_flags |= (skb_vlan_tag_get(skb) <<
+                            E1000_TX_FLAGS_VLAN_SHIFT);
        }
 
        first = tx_ring->next_to_use;
index eb088b129bc717ae786880b4d08d5d3260ddc1c7..caa43f7c293189b8b367c13bb18190560950e2c2 100644 (file)
@@ -965,8 +965,8 @@ static void fm10k_tx_map(struct fm10k_ring *tx_ring,
        tx_desc = FM10K_TX_DESC(tx_ring, i);
 
        /* add HW VLAN tag */
-       if (vlan_tx_tag_present(skb))
-               tx_desc->vlan = cpu_to_le16(vlan_tx_tag_get(skb));
+       if (skb_vlan_tag_present(skb))
+               tx_desc->vlan = cpu_to_le16(skb_vlan_tag_get(skb));
        else
                tx_desc->vlan = 0;
 
index 8811364b91cbed2bd8daee81911ad23c7e1bfb8f..945b35d31c71338da374525bf09b58f25349949b 100644 (file)
@@ -609,7 +609,7 @@ static netdev_tx_t fm10k_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        int err;
 
        if ((skb->protocol ==  htons(ETH_P_8021Q)) &&
-           !vlan_tx_tag_present(skb)) {
+           !skb_vlan_tag_present(skb)) {
                /* FM10K only supports hardware tagging, any tags in frame
                 * are considered 2nd level or "outer" tags
                 */
index 04b441460bbda6e36cb64731d24247a1b954e506..9f536dd8e1ec7e7a8e3b3e5c4bab8cdbb50b8c92 100644 (file)
@@ -1772,8 +1772,8 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
        u32  tx_flags = 0;
 
        /* if we have a HW VLAN tag being added, default to the HW one */
-       if (vlan_tx_tag_present(skb)) {
-               tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT;
+       if (skb_vlan_tag_present(skb)) {
+               tx_flags |= skb_vlan_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT;
                tx_flags |= I40E_TX_FLAGS_HW_VLAN;
        /* else if it is a SW VLAN, check the next protocol and store the tag */
        } else if (protocol == htons(ETH_P_8021Q)) {
index 04c7c1557a0c770ab0f256d3012cd3b9be70240e..82c3798fdd369a561ab074f3392a63608dc09db0 100644 (file)
@@ -1122,8 +1122,8 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
        u32  tx_flags = 0;
 
        /* if we have a HW VLAN tag being added, default to the HW one */
-       if (vlan_tx_tag_present(skb)) {
-               tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT;
+       if (skb_vlan_tag_present(skb)) {
+               tx_flags |= skb_vlan_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT;
                tx_flags |= I40E_TX_FLAGS_HW_VLAN;
        /* else if it is a SW VLAN, check the next protocol and store the tag */
        } else if (protocol == htons(ETH_P_8021Q)) {
index ff59897a946363442d657e84784962c6a600a45b..6c25ec314183a59b80a3921bc6a7b46c6e619b19 100644 (file)
@@ -5035,9 +5035,9 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
 
        skb_tx_timestamp(skb);
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_flags |= IGB_TX_FLAGS_VLAN;
-               tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
+               tx_flags |= (skb_vlan_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
        }
 
        /* record initial flags and protocol */
index 63c807c9b21c0f7d68f330bab3be65f2d806f173..ad2b4897b392cf52037c3df1ea6b2738b879cd51 100644 (file)
@@ -2234,9 +2234,10 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
                return NETDEV_TX_BUSY;
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_flags |= IGBVF_TX_FLAGS_VLAN;
-               tx_flags |= (vlan_tx_tag_get(skb) << IGBVF_TX_FLAGS_VLAN_SHIFT);
+               tx_flags |= (skb_vlan_tag_get(skb) <<
+                            IGBVF_TX_FLAGS_VLAN_SHIFT);
        }
 
        if (skb->protocol == htons(ETH_P_IP))
index aa87605b144a23a98d3ed7121c035c8703ad4627..11a1bdbe3fd9dcdd7e3da5094e34c83d1c151b56 100644 (file)
@@ -1532,9 +1532,9 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                      DESC_NEEDED)))
                return NETDEV_TX_BUSY;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                tx_flags |= IXGB_TX_FLAGS_VLAN;
-               vlan_id = vlan_tx_tag_get(skb);
+               vlan_id = skb_vlan_tag_get(skb);
        }
 
        first = adapter->tx_ring.next_to_use;
index 2ed2c7de230444f88c3f06451d7cc8a7167f5f05..7bb421bfd84ee71e93865de2ca845a4880d2d9cb 100644 (file)
@@ -7217,8 +7217,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
        first->gso_segs = 1;
 
        /* if we have a HW VLAN tag being added default to the HW one */
-       if (vlan_tx_tag_present(skb)) {
-               tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT;
+       if (skb_vlan_tag_present(skb)) {
+               tx_flags |= skb_vlan_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT;
                tx_flags |= IXGBE_TX_FLAGS_HW_VLAN;
        /* else if it is a SW VLAN check the next protocol and store the tag */
        } else if (protocol == htons(ETH_P_8021Q)) {
index 62a0d8e0f17da5ce75d48f9ff39fca5354c4447f..c9b49bfb51bb4b1c1e7913e6db26b6e8e856af58 100644 (file)
@@ -3452,8 +3452,8 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        first->bytecount = skb->len;
        first->gso_segs = 1;
 
-       if (vlan_tx_tag_present(skb)) {
-               tx_flags |= vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               tx_flags |= skb_vlan_tag_get(skb);
                tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
                tx_flags |= IXGBE_TX_FLAGS_VLAN;
        }
index 44ce7d88f554638035090cf165f0ffdbf1b2902f..6e9a792097d315891af8c36812e38fce15e71640 100644 (file)
@@ -2154,9 +2154,9 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags)
 static inline void
 jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags)
 {
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                *flags |= TXFLAG_TAGON;
-               *vlan = cpu_to_le16(vlan_tx_tag_get(skb));
+               *vlan = cpu_to_le16(skb_vlan_tag_get(skb));
        }
 }
 
index 867a6a3ef81f72c4c9da17ea861ab1bf30628833..d9f4498832a10b400e31b461e3b821d1fe56f714 100644 (file)
@@ -1895,14 +1895,14 @@ static netdev_tx_t sky2_xmit_frame(struct sk_buff *skb,
        ctrl = 0;
 
        /* Add VLAN tag, can piggyback on LRGLEN or ADDR64 */
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                if (!le) {
                        le = get_tx_le(sky2, &slot);
                        le->addr = 0;
                        le->opcode = OP_VLAN|HW_OWNER;
                } else
                        le->opcode |= OP_VLAN;
-               le->length = cpu_to_be16(vlan_tx_tag_get(skb));
+               le->length = cpu_to_be16(skb_vlan_tag_get(skb));
                ctrl |= INS_VLAN;
        }
 
@@ -2594,7 +2594,7 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
        sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
        prefetch(sky2->rx_ring + sky2->rx_next);
 
-       if (vlan_tx_tag_present(re->skb))
+       if (skb_vlan_tag_present(re->skb))
                count -= VLAN_HLEN;     /* Account for vlan tag */
 
        /* This chip has hardware problems that generates bogus status.
index e3357bf523df866222bdabdd0ec4c31cb24bb2a7..359bb1286eb5802cd38d34bf578bedebed102789 100644 (file)
@@ -682,8 +682,8 @@ u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb,
        if (dev->num_tc)
                return skb_tx_hash(dev, skb);
 
-       if (vlan_tx_tag_present(skb))
-               up = vlan_tx_tag_get(skb) >> VLAN_PRIO_SHIFT;
+       if (skb_vlan_tag_present(skb))
+               up = skb_vlan_tag_get(skb) >> VLAN_PRIO_SHIFT;
 
        return fallback(dev, skb) % rings_p_up + up * rings_p_up;
 }
@@ -742,8 +742,8 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
                goto tx_drop;
        }
 
-       if (vlan_tx_tag_present(skb))
-               vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb))
+               vlan_tag = skb_vlan_tag_get(skb);
 
 
        netdev_txq_bql_enqueue_prefetchw(ring->tx_queue);
@@ -930,7 +930,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
        real_size = (real_size / 16) & 0x3f;
 
        if (ring->bf_enabled && desc_size <= MAX_BF && !bounce &&
-           !vlan_tx_tag_present(skb) && send_doorbell) {
+           !skb_vlan_tag_present(skb) && send_doorbell) {
                tx_desc->ctrl.bf_qpn = ring->doorbell_qpn |
                                       cpu_to_be32(real_size);
 
@@ -952,7 +952,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
        } else {
                tx_desc->ctrl.vlan_tag = cpu_to_be16(vlan_tag);
                tx_desc->ctrl.ins_vlan = MLX4_WQE_CTRL_INS_VLAN *
-                       !!vlan_tx_tag_present(skb);
+                       !!skb_vlan_tag_present(skb);
                tx_desc->ctrl.fence_size = real_size;
 
                /* Ensure new descriptor hits memory
index 2552e550a78cb56926fd2eeb0f163683308c9378..eb807b0dc72a3745efc88e6f5ffdba2c126244c8 100644 (file)
@@ -1122,12 +1122,12 @@ again:
        }
 
 #ifdef NS83820_VLAN_ACCEL_SUPPORT
-       if(vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                /* fetch the vlan tag info out of the
                 * ancillary data if the vlan code
                 * is using hw vlan acceleration
                 */
-               short tag = vlan_tx_tag_get(skb);
+               short tag = skb_vlan_tag_get(skb);
                extsts |= (EXTSTS_VPKT | htons(tag));
        }
 #endif
index f5e4b820128ba8966e8a7d4ecdc9713e7982aa61..0529cad75b103e43a1f07b59f96698f5d89d96e0 100644 (file)
@@ -4045,8 +4045,8 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        queue = 0;
-       if (vlan_tx_tag_present(skb))
-               vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb))
+               vlan_tag = skb_vlan_tag_get(skb);
        if (sp->config.tx_steering_type == TX_DEFAULT_STEERING) {
                if (skb->protocol == htons(ETH_P_IP)) {
                        struct iphdr *ip;
index cc0485e3c6210997c532fd4cee51946e93983104..50d5604833edc8e0ffde1f7f8974002852f8bb97 100644 (file)
@@ -890,8 +890,8 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
                dev->name, __func__, __LINE__,
                fifo_hw, dtr, dtr_priv);
 
-       if (vlan_tx_tag_present(skb)) {
-               u16 vlan_tag = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               u16 vlan_tag = skb_vlan_tag_get(skb);
                vxge_hw_fifo_txdl_vlan_set(dtr, vlan_tag);
        }
 
index f39cae620f61568688c79415c6dbf9ebbf96ff90..a41bb5e6b954f0e6b40375b76a52ed8a254cdb18 100644 (file)
@@ -2462,9 +2462,9 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
                         NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;
 
        /* vlan tag */
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT |
-                                       vlan_tx_tag_get(skb));
+                                       skb_vlan_tag_get(skb));
        else
                start_tx->txvlan = 0;
 
index 613037584d08e785ef2700ca1d2221b50b256e9c..a47fe67fdf58ef4a5484c529bff54feeb8391e13 100644 (file)
@@ -1893,9 +1893,9 @@ netxen_tso_check(struct net_device *netdev,
                protocol = vh->h_vlan_encapsulated_proto;
                flags = FLAGS_VLAN_TAGGED;
 
-       } else if (vlan_tx_tag_present(skb)) {
+       } else if (skb_vlan_tag_present(skb)) {
                flags = FLAGS_VLAN_OOB;
-               vid = vlan_tx_tag_get(skb);
+               vid = skb_vlan_tag_get(skb);
                netxen_set_tx_vlan_tci(first_desc, vid);
                vlan_oob = 1;
        }
index d166e534925d7610f049585a6a38aa12bcbb5d2f..4d2496f28b85a70fb3daad9eb2a77da7f03893d1 100644 (file)
@@ -321,8 +321,8 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,
                if (protocol == ETH_P_8021Q) {
                        vh = (struct vlan_ethhdr *)skb->data;
                        vlan_id = ntohs(vh->h_vlan_TCI);
-               } else if (vlan_tx_tag_present(skb)) {
-                       vlan_id = vlan_tx_tag_get(skb);
+               } else if (skb_vlan_tag_present(skb)) {
+                       vlan_id = skb_vlan_tag_get(skb);
                }
        }
 
@@ -473,9 +473,9 @@ static int qlcnic_tx_pkt(struct qlcnic_adapter *adapter,
                flags = QLCNIC_FLAGS_VLAN_TAGGED;
                vlan_tci = ntohs(vh->h_vlan_TCI);
                protocol = ntohs(vh->h_vlan_encapsulated_proto);
-       } else if (vlan_tx_tag_present(skb)) {
+       } else if (skb_vlan_tag_present(skb)) {
                flags = QLCNIC_FLAGS_VLAN_OOB;
-               vlan_tci = vlan_tx_tag_get(skb);
+               vlan_tci = skb_vlan_tag_get(skb);
        }
        if (unlikely(adapter->tx_pvid)) {
                if (vlan_tci && !(adapter->flags & QLCNIC_TAGGING_ENABLED))
index 6c904a6cad2a177036b42190cffb17a25e194708..dc0058f9037001b56eb816f0b3d3765089c919cd 100644 (file)
@@ -2660,11 +2660,11 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
 
        mac_iocb_ptr->frame_len = cpu_to_le16((u16) skb->len);
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev,
-                            "Adding a vlan tag %d.\n", vlan_tx_tag_get(skb));
+                            "Adding a vlan tag %d.\n", skb_vlan_tag_get(skb));
                mac_iocb_ptr->flags3 |= OB_MAC_IOCB_V;
-               mac_iocb_ptr->vlan_tci = cpu_to_le16(vlan_tx_tag_get(skb));
+               mac_iocb_ptr->vlan_tci = cpu_to_le16(skb_vlan_tag_get(skb));
        }
        tso = ql_tso(skb, (struct ob_mac_tso_iocb_req *)mac_iocb_ptr);
        if (tso < 0) {
index 9c31e46d1eee481d112b6cd9a5fb0ec761322b07..d79e33b3c1913ae41caa046860fc74fb2d4c8698 100644 (file)
@@ -708,8 +708,8 @@ static void cp_tx (struct cp_private *cp)
 
 static inline u32 cp_tx_vlan_tag(struct sk_buff *skb)
 {
-       return vlan_tx_tag_present(skb) ?
-               TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
+       return skb_vlan_tag_present(skb) ?
+               TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00;
 }
 
 static void unwind_tx_frag_mapping(struct cp_private *cp, struct sk_buff *skb,
index 3a280598a15a1d9fbe34c437c9cfb2b8c07fe06a..cd286b0356ab497fb437c93aa46cc0233c68c976 100644 (file)
@@ -2073,8 +2073,8 @@ static int rtl8169_set_features(struct net_device *dev,
 
 static inline u32 rtl8169_tx_vlan_tag(struct sk_buff *skb)
 {
-       return (vlan_tx_tag_present(skb)) ?
-               TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
+       return (skb_vlan_tag_present(skb)) ?
+               TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00;
 }
 
 static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb)
index b6612d6090ac45de92b0524796abb5e11067a3a6..23545e1e605a7ef12866a2075e63bd34051b4d0b 100644 (file)
@@ -1272,7 +1272,7 @@ static netdev_tx_t sxgbe_xmit(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(skb_is_gso(skb) && tqueue->prev_mss != cur_mss))
                ctxt_desc_req = 1;
 
-       if (unlikely(vlan_tx_tag_present(skb) ||
+       if (unlikely(skb_vlan_tag_present(skb) ||
                     ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
                      tqueue->hwts_tx_en)))
                ctxt_desc_req = 1;
index 6ab36d9ff2abf0b846667e71dc238a63a670db23..a9cac8413e49e8062875d93af33b8ea4d41061b6 100644 (file)
@@ -1650,9 +1650,9 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
                    txd_mss);
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                /*Cut VLAN ID to 12 bits */
-               txd_vlan_id = vlan_tx_tag_get(skb) & BITS_MASK(12);
+               txd_vlan_id = skb_vlan_tag_get(skb) & BITS_MASK(12);
                txd_vtag = 1;
        }
 
index a191afc23b56c72bbdc6bf3379b646ba2ec72fdf..0ac76102b33dca861b67344ba1fbf320d2aa1f88 100644 (file)
@@ -1781,8 +1781,8 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb,
        rp->tx_ring[entry].desc_length =
                cpu_to_le32(TXDESC | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN));
 
-       if (unlikely(vlan_tx_tag_present(skb))) {
-               u16 vid_pcp = vlan_tx_tag_get(skb);
+       if (unlikely(skb_vlan_tag_present(skb))) {
+               u16 vid_pcp = skb_vlan_tag_get(skb);
 
                /* drop CFI/DEI bit, register needs VID and PCP */
                vid_pcp = (vid_pcp & VLAN_VID_MASK) |
@@ -1803,7 +1803,7 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb,
 
        /* Non-x86 Todo: explicitly flush cache lines here. */
 
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                /* Tx queues are bits 7-0 (first Tx queue: bit 7) */
                BYTE_REG_BITS_ON(1 << 7, ioaddr + TQWake);
 
index 282f83a63b67a88fec08b2524ced2bbf36fc907a..c20206f83cc1fdf3445cfc41139724f0dbdbdd92 100644 (file)
@@ -2611,8 +2611,8 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb,
 
        td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16;
 
-       if (vlan_tx_tag_present(skb)) {
-               td_ptr->tdesc1.vlan = cpu_to_le16(vlan_tx_tag_get(skb));
+       if (skb_vlan_tag_present(skb)) {
+               td_ptr->tdesc1.vlan = cpu_to_le16(skb_vlan_tag_get(skb));
                td_ptr->tdesc1.TCR |= TCR0_VETAG;
        }
 
index 7df221788cd4dc7ae4d8c3ed2f53789296d00deb..d0ed5694dd7d6d1a5a2f695e2319f7ca0437e1c0 100644 (file)
@@ -645,7 +645,7 @@ static void macvtap_skb_to_vnet_hdr(struct macvtap_queue *q,
 
        if (skb->ip_summed == CHECKSUM_PARTIAL) {
                vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
-               if (vlan_tx_tag_present(skb))
+               if (skb_vlan_tag_present(skb))
                        vnet_hdr->csum_start = cpu_to_macvtap16(q,
                                skb_checksum_start_offset(skb) + VLAN_HLEN);
                else
@@ -821,13 +821,13 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
        total = vnet_hdr_len;
        total += skb->len;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                struct {
                        __be16 h_vlan_proto;
                        __be16 h_vlan_TCI;
                } veth;
                veth.h_vlan_proto = skb->vlan_proto;
-               veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb));
+               veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb));
 
                vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto);
                total += VLAN_HLEN;
index 74fdf1158448c4213633e7f04c90b1711a3f2e2a..be196e89ab6cf0b54e26cfe3e03110e1cfe959c6 100644 (file)
@@ -1260,7 +1260,7 @@ static ssize_t tun_put_user(struct tun_struct *tun,
        int vlan_hlen = 0;
        int vnet_hdr_sz = 0;
 
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                vlan_hlen = VLAN_HLEN;
 
        if (tun->flags & IFF_VNET_HDR)
@@ -1337,7 +1337,7 @@ static ssize_t tun_put_user(struct tun_struct *tun,
                } veth;
 
                veth.h_vlan_proto = skb->vlan_proto;
-               veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb));
+               veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb));
 
                vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto);
 
index b23426e4952cec94f954b2bd2f85cd037432510f..e519e6a269b941e16a8acc7e4bfb92d0dc17bbad 100644 (file)
@@ -1421,10 +1421,10 @@ static int msdn_giant_send_check(struct sk_buff *skb)
 
 static inline void rtl_tx_vlan_tag(struct tx_desc *desc, struct sk_buff *skb)
 {
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                u32 opts2;
 
-               opts2 = TX_VLAN_TAG | swab16(vlan_tx_tag_get(skb));
+               opts2 = TX_VLAN_TAG | swab16(skb_vlan_tag_get(skb));
                desc->opts2 |= cpu_to_le32(opts2);
        }
 }
index 31439818c27effa4a9e7b2bfef07240442dbe123..294214c152927a30564bf83d9204f3351b64f237 100644 (file)
@@ -1038,9 +1038,9 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
                le32_add_cpu(&tq->shared->txNumDeferred, 1);
        }
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                gdesc->txd.ti = 1;
-               gdesc->txd.tci = vlan_tx_tag_get(skb);
+               gdesc->txd.tci = skb_vlan_tag_get(skb);
        }
 
        /* finally flips the GEN bit of the SOP desc. */
index 3a18d8ed89ca28cdb9c8af4f08a2ae733f3de211..985359dd60332de0b2458563a47effe11b8ae71c 100644 (file)
@@ -1561,7 +1561,7 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs,
 
        min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len
                        + VXLAN_HLEN + sizeof(struct ipv6hdr)
-                       + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+                       + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
 
        /* Need space for new headers (invalidates iph ptr) */
        err = skb_cow_head(skb, min_headroom);
@@ -1607,7 +1607,7 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
 
        min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
                        + VXLAN_HLEN + sizeof(struct iphdr)
-                       + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+                       + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
 
        /* Need space for new headers (invalidates iph ptr) */
        err = skb_cow_head(skb, min_headroom);
index 625227ad16ee91cd2b4ca1aaa8a9541408e2a838..dd4ab8d73d34903b85590131e16241d7d3b66883 100644 (file)
@@ -2800,12 +2800,12 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
         * before we're going to overwrite this location with next hop ip.
         * v6 uses passthrough, v4 sets the tag in the QDIO header.
         */
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                if ((ipv == 4) || (card->info.type == QETH_CARD_TYPE_IQD))
                        hdr->hdr.l3.ext_flags = QETH_HDR_EXT_VLAN_FRAME;
                else
                        hdr->hdr.l3.ext_flags = QETH_HDR_EXT_INCLUDE_VLAN_TAG;
-               hdr->hdr.l3.vlan_id = vlan_tx_tag_get(skb);
+               hdr->hdr.l3.vlan_id = skb_vlan_tag_get(skb);
        }
 
        hdr->hdr.l3.length = skb->len - sizeof(struct qeth_hdr);
@@ -2986,7 +2986,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        skb_pull(new_skb, ETH_HLEN);
                }
 
-               if (ipv != 4 && vlan_tx_tag_present(new_skb)) {
+               if (ipv != 4 && skb_vlan_tag_present(new_skb)) {
                        skb_push(new_skb, VLAN_HLEN);
                        skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);
                        skb_copy_to_linear_data_offset(new_skb, 4,
@@ -2995,7 +2995,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
                                new_skb->data + 12, 4);
                        tag = (u16 *)(new_skb->data + 12);
                        *tag = __constant_htons(ETH_P_8021Q);
-                       *(tag + 1) = htons(vlan_tx_tag_get(new_skb));
+                       *(tag + 1) = htons(skb_vlan_tag_get(new_skb));
                }
        }
 
index 14419a8ccbb6b138aa8bd38b7765166c1f4aa398..bcaf4cabb8585a0012826bc5450c57e37297adfc 100644 (file)
@@ -469,7 +469,7 @@ static int peek_head_len(struct sock *sk)
        head = skb_peek(&sk->sk_receive_queue);
        if (likely(head)) {
                len = head->len;
-               if (vlan_tx_tag_present(head))
+               if (skb_vlan_tag_present(head))
                        len += VLAN_HLEN;
        }
 
index 515a35e2a48ab7e55d550fcd164466080773b3ce..bea465f24ebb4e59fb5a0436b95eab2f5e6bc065 100644 (file)
@@ -78,9 +78,9 @@ static inline bool is_vlan_dev(struct net_device *dev)
         return dev->priv_flags & IFF_802_1Q_VLAN;
 }
 
-#define vlan_tx_tag_present(__skb)     ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
-#define vlan_tx_tag_get(__skb)         ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
-#define vlan_tx_tag_get_id(__skb)      ((__skb)->vlan_tci & VLAN_VID_MASK)
+#define skb_vlan_tag_present(__skb)    ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
+#define skb_vlan_tag_get(__skb)                ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
+#define skb_vlan_tag_get_id(__skb)     ((__skb)->vlan_tci & VLAN_VID_MASK)
 
 /**
  *     struct vlan_pcpu_stats - VLAN percpu rx/tx stats
@@ -376,7 +376,7 @@ static inline struct sk_buff *vlan_insert_tag_set_proto(struct sk_buff *skb,
 static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb)
 {
        skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
-                                       vlan_tx_tag_get(skb));
+                                       skb_vlan_tag_get(skb));
        if (likely(skb))
                skb->vlan_tci = 0;
        return skb;
@@ -393,7 +393,7 @@ static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb)
  */
 static inline struct sk_buff *vlan_hwaccel_push_inside(struct sk_buff *skb)
 {
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                skb = __vlan_hwaccel_push_inside(skb);
        return skb;
 }
@@ -442,8 +442,8 @@ static inline int __vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
 static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb,
                                         u16 *vlan_tci)
 {
-       if (vlan_tx_tag_present(skb)) {
-               *vlan_tci = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               *vlan_tci = skb_vlan_tag_get(skb);
                return 0;
        } else {
                *vlan_tci = 0;
@@ -480,7 +480,7 @@ static inline __be16 vlan_get_protocol(const struct sk_buff *skb)
 {
        __be16 protocol = 0;
 
-       if (vlan_tx_tag_present(skb) ||
+       if (skb_vlan_tag_present(skb) ||
             skb->protocol != cpu_to_be16(ETH_P_8021Q))
                protocol = skb->protocol;
        else {
index fe6e7aac3c56d3b0d918c10901a0ba3e79ddf2db..2342bf12cb78a07fb44cbd389fb548cf38801ec3 100644 (file)
@@ -121,7 +121,7 @@ static inline __be16 tc_skb_protocol(const struct sk_buff *skb)
         * vlan accelerated path. In that case, use skb->vlan_proto
         * as the original vlan header was already stripped.
         */
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                return skb->vlan_proto;
        return skb->protocol;
 }
index 1de256b358074b6b3486e4e1b4686f9ecace6320..49cc7c3de25221f2e014c80f12189bb1edc3b946 100644 (file)
@@ -40,9 +40,9 @@ TRACE_EVENT(net_dev_start_xmit,
                __assign_str(name, dev->name);
                __entry->queue_mapping = skb->queue_mapping;
                __entry->skbaddr = skb;
-               __entry->vlan_tagged = vlan_tx_tag_present(skb);
+               __entry->vlan_tagged = skb_vlan_tag_present(skb);
                __entry->vlan_proto = ntohs(skb->vlan_proto);
-               __entry->vlan_tci = vlan_tx_tag_get(skb);
+               __entry->vlan_tci = skb_vlan_tag_get(skb);
                __entry->protocol = ntohs(skb->protocol);
                __entry->ip_summed = skb->ip_summed;
                __entry->len = skb->len;
@@ -174,9 +174,9 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template,
 #endif
                __entry->queue_mapping = skb->queue_mapping;
                __entry->skbaddr = skb;
-               __entry->vlan_tagged = vlan_tx_tag_present(skb);
+               __entry->vlan_tagged = skb_vlan_tag_present(skb);
                __entry->vlan_proto = ntohs(skb->vlan_proto);
-               __entry->vlan_tci = vlan_tx_tag_get(skb);
+               __entry->vlan_tci = skb_vlan_tag_get(skb);
                __entry->protocol = ntohs(skb->protocol);
                __entry->ip_summed = skb->ip_summed;
                __entry->hash = skb->hash;
index 90cc2bdd406444df8c122066e0b5f23c33c8ed37..61bf2a06e85d62ce9d319b02f1bf1ebb569e3964 100644 (file)
@@ -9,7 +9,7 @@ bool vlan_do_receive(struct sk_buff **skbp)
 {
        struct sk_buff *skb = *skbp;
        __be16 vlan_proto = skb->vlan_proto;
-       u16 vlan_id = vlan_tx_tag_get_id(skb);
+       u16 vlan_id = skb_vlan_tag_get_id(skb);
        struct net_device *vlan_dev;
        struct vlan_pcpu_stats *rx_stats;
 
index c190d22b6b3d9e96ce91c182ea561a6c02c6e125..65728e0dc4ffd011fe87440510b76d34aa1b6ecb 100644 (file)
@@ -66,17 +66,17 @@ static int brnf_pass_vlan_indev __read_mostly = 0;
 #endif
 
 #define IS_IP(skb) \
-       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
+       (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
 
 #define IS_IPV6(skb) \
-       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
+       (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
 
 #define IS_ARP(skb) \
-       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
+       (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
 
 static inline __be16 vlan_proto(const struct sk_buff *skb)
 {
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                return skb->protocol;
        else if (skb->protocol == htons(ETH_P_8021Q))
                return vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
@@ -436,11 +436,11 @@ static struct net_device *brnf_get_logical_dev(struct sk_buff *skb, const struct
        struct net_device *vlan, *br;
 
        br = bridge_parent(dev);
-       if (brnf_pass_vlan_indev == 0 || !vlan_tx_tag_present(skb))
+       if (brnf_pass_vlan_indev == 0 || !skb_vlan_tag_present(skb))
                return br;
 
        vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto,
-                                   vlan_tx_tag_get(skb) & VLAN_VID_MASK);
+                                   skb_vlan_tag_get(skb) & VLAN_VID_MASK);
 
        return vlan ? vlan : br;
 }
index aea3d1339b3f3d248a9d5517725dbe3732c03d8e..d808d766334d8b3b6d5ad95f6ae77a1989abd252 100644 (file)
@@ -628,8 +628,8 @@ static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid)
 {
        int err = 0;
 
-       if (vlan_tx_tag_present(skb))
-               *vid = vlan_tx_tag_get(skb) & VLAN_VID_MASK;
+       if (skb_vlan_tag_present(skb))
+               *vid = skb_vlan_tag_get(skb) & VLAN_VID_MASK;
        else {
                *vid = 0;
                err = -EINVAL;
index 97b8ddf573634b3d7fe9a40979ea5db0c3e01377..13013fe8db246d2002944d25b61f4db612116d52 100644 (file)
@@ -187,7 +187,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
         * sent from vlan device on the bridge device, it does not have
         * HW accelerated vlan tag.
         */
-       if (unlikely(!vlan_tx_tag_present(skb) &&
+       if (unlikely(!skb_vlan_tag_present(skb) &&
                     skb->protocol == proto)) {
                skb = skb_vlan_untag(skb);
                if (unlikely(!skb))
@@ -200,7 +200,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
                        /* Protocol-mismatch, empty out vlan_tci for new tag */
                        skb_push(skb, ETH_HLEN);
                        skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
-                                                       vlan_tx_tag_get(skb));
+                                                       skb_vlan_tag_get(skb));
                        if (unlikely(!skb))
                                return false;
 
index 8d3f8c7651f0dcec64bc7cac84a7f9c3d8953352..6185688881285f356f98c0ab328fd91da45b1239 100644 (file)
@@ -45,8 +45,8 @@ ebt_vlan_mt(const struct sk_buff *skb, struct xt_action_param *par)
        /* VLAN encapsulated Type/Length field, given from orig frame */
        __be16 encap;
 
-       if (vlan_tx_tag_present(skb)) {
-               TCI = vlan_tx_tag_get(skb);
+       if (skb_vlan_tag_present(skb)) {
+               TCI = skb_vlan_tag_get(skb);
                encap = skb->protocol;
        } else {
                const struct vlan_hdr *fp;
index d9a8c05d995d14466d2cef02fcd571d4ad009272..91180a7fc94376ea3ca7eecf274c03c3bc919590 100644 (file)
@@ -133,7 +133,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
        __be16 ethproto;
        int verdict, i;
 
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                ethproto = htons(ETH_P_8021Q);
        else
                ethproto = h->h_proto;
index 805456147c30681b70f697477da913a89ef97d7a..1e325adc43678084418ef9e1abb1fca8059ff599 100644 (file)
@@ -2578,7 +2578,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
        if (skb->encapsulation)
                features &= dev->hw_enc_features;
 
-       if (!vlan_tx_tag_present(skb)) {
+       if (!skb_vlan_tag_present(skb)) {
                if (unlikely(protocol == htons(ETH_P_8021Q) ||
                             protocol == htons(ETH_P_8021AD))) {
                        struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
@@ -2659,7 +2659,7 @@ out:
 static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb,
                                          netdev_features_t features)
 {
-       if (vlan_tx_tag_present(skb) &&
+       if (skb_vlan_tag_present(skb) &&
            !vlan_hw_offload_capable(features, skb->vlan_proto))
                skb = __vlan_hwaccel_push_inside(skb);
        return skb;
@@ -3676,7 +3676,7 @@ ncls:
        if (pfmemalloc && !skb_pfmemalloc_protocol(skb))
                goto drop;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                if (pt_prev) {
                        ret = deliver_skb(skb, pt_prev, orig_dev);
                        pt_prev = NULL;
@@ -3708,8 +3708,8 @@ ncls:
                }
        }
 
-       if (unlikely(vlan_tx_tag_present(skb))) {
-               if (vlan_tx_tag_get_id(skb))
+       if (unlikely(skb_vlan_tag_present(skb))) {
+               if (skb_vlan_tag_get_id(skb))
                        skb->pkt_type = PACKET_OTHERHOST;
                /* Note: we might in the future use prio bits
                 * and set skb->priority like in vlan_do_receive()
index e0ad5d16c9c56947163d81201af07e26d1d3017c..c126a878c47c95587cd4713ee500ec0e9577af39 100644 (file)
@@ -77,7 +77,7 @@ static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev,
 
        features = netif_skb_features(skb);
 
-       if (vlan_tx_tag_present(skb) &&
+       if (skb_vlan_tag_present(skb) &&
            !vlan_hw_offload_capable(features, skb->vlan_proto)) {
                skb = __vlan_hwaccel_push_inside(skb);
                if (unlikely(!skb)) {
index 5a2a2e887a12ee3d813fa81b0b26ac8c1f0c24d8..56db472e9b864e805e0ab36dd73a0404d2fc66d5 100644 (file)
@@ -4197,7 +4197,7 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb)
        struct vlan_hdr *vhdr;
        u16 vlan_tci;
 
-       if (unlikely(vlan_tx_tag_present(skb))) {
+       if (unlikely(skb_vlan_tag_present(skb))) {
                /* vlan_tci is already set-up so leave this for another time */
                return skb;
        }
@@ -4283,7 +4283,7 @@ int skb_vlan_pop(struct sk_buff *skb)
        __be16 vlan_proto;
        int err;
 
-       if (likely(vlan_tx_tag_present(skb))) {
+       if (likely(skb_vlan_tag_present(skb))) {
                skb->vlan_tci = 0;
        } else {
                if (unlikely((skb->protocol != htons(ETH_P_8021Q) &&
@@ -4313,7 +4313,7 @@ EXPORT_SYMBOL(skb_vlan_pop);
 
 int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
 {
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                unsigned int offset = skb->data - skb_mac_header(skb);
                int err;
 
@@ -4323,7 +4323,7 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
                 */
                __skb_push(skb, offset);
                err = __vlan_insert_tag(skb, skb->vlan_proto,
-                                       vlan_tx_tag_get(skb));
+                                       skb_vlan_tag_get(skb));
                if (err)
                        return err;
                skb->protocol = skb->vlan_proto;
index 5b52046ec7a2e134de93ad39fa0dc4c1523fc9c0..23744c7a97188a0cd3576d29cb82682c1df0fc2f 100644 (file)
@@ -119,7 +119,7 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
 
        min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
                        + GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr)
-                       + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+                       + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
 
        err = skb_cow_head(skb, min_headroom);
        if (unlikely(err)) {
index 770064c837112ca23fb1bbecf75b2d84643e88b0..b4cffe686126e501505957f0fb2281f5c16d317b 100644 (file)
@@ -212,7 +212,7 @@ static int pop_vlan(struct sk_buff *skb, struct sw_flow_key *key)
        int err;
 
        err = skb_vlan_pop(skb);
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                invalidate_flow_key(key);
        else
                key->eth.tci = 0;
@@ -222,7 +222,7 @@ static int pop_vlan(struct sk_buff *skb, struct sw_flow_key *key)
 static int push_vlan(struct sk_buff *skb, struct sw_flow_key *key,
                     const struct ovs_action_push_vlan *vlan)
 {
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                invalidate_flow_key(key);
        else
                key->eth.tci = vlan->vlan_tci;
index 4e9a5f035cbcf144998ae7c22c90151429cf7031..54854e3ecd83a1524d06c69ead4f4e03e5b9199c 100644 (file)
@@ -419,7 +419,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
        if (!dp_ifindex)
                return -ENODEV;
 
-       if (vlan_tx_tag_present(skb)) {
+       if (skb_vlan_tag_present(skb)) {
                nskb = skb_clone(skb, GFP_ATOMIC);
                if (!nskb)
                        return -ENOMEM;
index da2fae0873a5d7f4ad56a85b81575152ec1727bc..df334fe43d7fe27a3008ee79c007f6f64781b52a 100644 (file)
@@ -70,7 +70,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags,
 {
        struct flow_stats *stats;
        int node = numa_node_id();
-       int len = skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+       int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
 
        stats = rcu_dereference(flow->stats[node]);
 
@@ -472,7 +472,7 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
         */
 
        key->eth.tci = 0;
-       if (vlan_tx_tag_present(skb))
+       if (skb_vlan_tag_present(skb))
                key->eth.tci = htons(skb->vlan_tci);
        else if (eth->h_proto == htons(ETH_P_8021Q))
                if (unlikely(parse_vlan(skb, key)))
index d4168c442db5af8683c72bfb24ce95c789dadcf8..e9aedb7c7106ead1e072c9c25cb8e70175c672a9 100644 (file)
@@ -166,7 +166,7 @@ static int gre_tnl_send(struct vport *vport, struct sk_buff *skb)
 
        min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
                        + tunnel_hlen + sizeof(struct iphdr)
-                       + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+                       + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
        if (skb_headroom(skb) < min_headroom || skb_header_cloned(skb)) {
                int head_delta = SKB_DATA_ALIGN(min_headroom -
                                                skb_headroom(skb) +
index 2034c6d9cb5a51f3094747e768c93522024bea96..464739aac0f3c6c4e27d9c165b0efce40906abe5 100644 (file)
@@ -480,7 +480,8 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
        stats = this_cpu_ptr(vport->percpu_stats);
        u64_stats_update_begin(&stats->syncp);
        stats->rx_packets++;
-       stats->rx_bytes += skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
+       stats->rx_bytes += skb->len +
+                          (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
        u64_stats_update_end(&stats->syncp);
 
        OVS_CB(skb)->input_vport = vport;
index 0f02668dc2197ffd833fd8375a8fd7260e55b4f6..d37075b0d6d5cc045a65d76bf37870856de0d197 100644 (file)
@@ -986,8 +986,8 @@ static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc,
 static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc,
                        struct tpacket3_hdr *ppd)
 {
-       if (vlan_tx_tag_present(pkc->skb)) {
-               ppd->hv1.tp_vlan_tci = vlan_tx_tag_get(pkc->skb);
+       if (skb_vlan_tag_present(pkc->skb)) {
+               ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb);
                ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto);
                ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID;
        } else {
@@ -2000,8 +2000,8 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
                h.h2->tp_net = netoff;
                h.h2->tp_sec = ts.tv_sec;
                h.h2->tp_nsec = ts.tv_nsec;
-               if (vlan_tx_tag_present(skb)) {
-                       h.h2->tp_vlan_tci = vlan_tx_tag_get(skb);
+               if (skb_vlan_tag_present(skb)) {
+                       h.h2->tp_vlan_tci = skb_vlan_tag_get(skb);
                        h.h2->tp_vlan_tpid = ntohs(skb->vlan_proto);
                        status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID;
                } else {
@@ -3010,8 +3010,8 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
                aux.tp_snaplen = skb->len;
                aux.tp_mac = 0;
                aux.tp_net = skb_network_offset(skb);
-               if (vlan_tx_tag_present(skb)) {
-                       aux.tp_vlan_tci = vlan_tx_tag_get(skb);
+               if (skb_vlan_tag_present(skb)) {
+                       aux.tp_vlan_tci = skb_vlan_tag_get(skb);
                        aux.tp_vlan_tpid = ntohs(skb->vlan_proto);
                        aux.tp_status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID;
                } else {
index 2159981b604efba493daacc4e8bbde88c5aaf086..b5294ce20cd467063721cea69348cb35d7999921 100644 (file)
@@ -176,7 +176,7 @@ META_COLLECTOR(int_vlan_tag)
 {
        unsigned short tag;
 
-       tag = vlan_tx_tag_get(skb);
+       tag = skb_vlan_tag_get(skb);
        if (!tag && __vlan_get_tag(skb, &tag))
                *err = -1;
        else
index d0ac795445b7e40dc92ebb1e0bd9095fc4bab048..1d2fcfad06cc335e51d488c9ceef98f67cd2d730 100644 (file)
@@ -708,8 +708,8 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
        if (skb->priority >= 256 && skb->priority <= 263)
                return skb->priority - 256;
 
-       if (vlan_tx_tag_present(skb)) {
-               vlan_priority = (vlan_tx_tag_get(skb) & VLAN_PRIO_MASK)
+       if (skb_vlan_tag_present(skb)) {
+               vlan_priority = (skb_vlan_tag_get(skb) & VLAN_PRIO_MASK)
                        >> VLAN_PRIO_SHIFT;
                if (vlan_priority > 0)
                        return vlan_priority;