diff options
77 files changed, 195 insertions, 190 deletions
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index 58d08f8d8d80..9930ecfbb465 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
@@ -279,8 +279,8 @@ Possible BPF extensions are shown in the following table: | |||
279 | hatype skb->dev->type | 279 | hatype skb->dev->type |
280 | rxhash skb->hash | 280 | rxhash skb->hash |
281 | cpu raw_smp_processor_id() | 281 | cpu raw_smp_processor_id() |
282 | vlan_tci vlan_tx_tag_get(skb) | 282 | vlan_tci skb_vlan_tag_get(skb) |
283 | vlan_pr vlan_tx_tag_present(skb) | 283 | vlan_pr skb_vlan_tag_present(skb) |
284 | rand prandom_u32() | 284 | rand prandom_u32() |
285 | 285 | ||
286 | These extensions can also be prefixed with '#'. | 286 | These extensions can also be prefixed with '#'. |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 49eb5111d2cd..70acda91eb2a 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -373,11 +373,11 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) | |||
373 | wqe_fragment_length = (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX]; | 373 | wqe_fragment_length = (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX]; |
374 | 374 | ||
375 | /* setup the VLAN tag if present */ | 375 | /* setup the VLAN tag if present */ |
376 | if (vlan_tx_tag_present(skb)) { | 376 | if (skb_vlan_tag_present(skb)) { |
377 | nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n", | 377 | nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n", |
378 | netdev->name, vlan_tx_tag_get(skb)); | 378 | netdev->name, skb_vlan_tag_get(skb)); |
379 | wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE; | 379 | wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE; |
380 | wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb); | 380 | wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb); |
381 | } else | 381 | } else |
382 | wqe_misc = 0; | 382 | wqe_misc = 0; |
383 | 383 | ||
@@ -576,11 +576,12 @@ tso_sq_no_longer_full: | |||
576 | wqe_fragment_length = | 576 | wqe_fragment_length = |
577 | (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX]; | 577 | (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX]; |
578 | /* setup the VLAN tag if present */ | 578 | /* setup the VLAN tag if present */ |
579 | if (vlan_tx_tag_present(skb)) { | 579 | if (skb_vlan_tag_present(skb)) { |
580 | nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n", | 580 | nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n", |
581 | netdev->name, vlan_tx_tag_get(skb) ); | 581 | netdev->name, |
582 | skb_vlan_tag_get(skb)); | ||
582 | wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE; | 583 | wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE; |
583 | wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb); | 584 | wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb); |
584 | } else | 585 | } else |
585 | wqe_misc = 0; | 586 | wqe_misc = 0; |
586 | 587 | ||
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c index dede43f4ce09..8f8418d2ac4a 100644 --- a/drivers/net/ethernet/3com/typhoon.c +++ b/drivers/net/ethernet/3com/typhoon.c | |||
@@ -769,11 +769,11 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
769 | first_txd->processFlags |= TYPHOON_TX_PF_IP_CHKSUM; | 769 | first_txd->processFlags |= TYPHOON_TX_PF_IP_CHKSUM; |
770 | } | 770 | } |
771 | 771 | ||
772 | if(vlan_tx_tag_present(skb)) { | 772 | if (skb_vlan_tag_present(skb)) { |
773 | first_txd->processFlags |= | 773 | first_txd->processFlags |= |
774 | TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY; | 774 | TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY; |
775 | first_txd->processFlags |= | 775 | first_txd->processFlags |= |
776 | cpu_to_le32(htons(vlan_tx_tag_get(skb)) << | 776 | cpu_to_le32(htons(skb_vlan_tag_get(skb)) << |
777 | TYPHOON_TX_PF_VLAN_TAG_SHIFT); | 777 | TYPHOON_TX_PF_VLAN_TAG_SHIFT); |
778 | } | 778 | } |
779 | 779 | ||
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c index b68074803de3..b90a26b13fdf 100644 --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c | |||
@@ -2429,9 +2429,9 @@ restart: | |||
2429 | flagsize = (skb->len << 16) | (BD_FLG_END); | 2429 | flagsize = (skb->len << 16) | (BD_FLG_END); |
2430 | if (skb->ip_summed == CHECKSUM_PARTIAL) | 2430 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
2431 | flagsize |= BD_FLG_TCP_UDP_SUM; | 2431 | flagsize |= BD_FLG_TCP_UDP_SUM; |
2432 | if (vlan_tx_tag_present(skb)) { | 2432 | if (skb_vlan_tag_present(skb)) { |
2433 | flagsize |= BD_FLG_VLAN_TAG; | 2433 | flagsize |= BD_FLG_VLAN_TAG; |
2434 | vlan_tag = vlan_tx_tag_get(skb); | 2434 | vlan_tag = skb_vlan_tag_get(skb); |
2435 | } | 2435 | } |
2436 | desc = ap->tx_ring + idx; | 2436 | desc = ap->tx_ring + idx; |
2437 | idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap); | 2437 | idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap); |
@@ -2450,9 +2450,9 @@ restart: | |||
2450 | flagsize = (skb_headlen(skb) << 16); | 2450 | flagsize = (skb_headlen(skb) << 16); |
2451 | if (skb->ip_summed == CHECKSUM_PARTIAL) | 2451 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
2452 | flagsize |= BD_FLG_TCP_UDP_SUM; | 2452 | flagsize |= BD_FLG_TCP_UDP_SUM; |
2453 | if (vlan_tx_tag_present(skb)) { | 2453 | if (skb_vlan_tag_present(skb)) { |
2454 | flagsize |= BD_FLG_VLAN_TAG; | 2454 | flagsize |= BD_FLG_VLAN_TAG; |
2455 | vlan_tag = vlan_tx_tag_get(skb); | 2455 | vlan_tag = skb_vlan_tag_get(skb); |
2456 | } | 2456 | } |
2457 | 2457 | ||
2458 | ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag); | 2458 | ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag); |
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index 841e6558db68..4c2ae2221780 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c | |||
@@ -1299,11 +1299,11 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb, | |||
1299 | lp->tx_ring[tx_index].tx_flags = 0; | 1299 | lp->tx_ring[tx_index].tx_flags = 0; |
1300 | 1300 | ||
1301 | #if AMD8111E_VLAN_TAG_USED | 1301 | #if AMD8111E_VLAN_TAG_USED |
1302 | if (vlan_tx_tag_present(skb)) { | 1302 | if (skb_vlan_tag_present(skb)) { |
1303 | lp->tx_ring[tx_index].tag_ctrl_cmd |= | 1303 | lp->tx_ring[tx_index].tag_ctrl_cmd |= |
1304 | cpu_to_le16(TCC_VLAN_INSERT); | 1304 | cpu_to_le16(TCC_VLAN_INSERT); |
1305 | lp->tx_ring[tx_index].tag_ctrl_info = | 1305 | lp->tx_ring[tx_index].tag_ctrl_info = |
1306 | cpu_to_le16(vlan_tx_tag_get(skb)); | 1306 | cpu_to_le16(skb_vlan_tag_get(skb)); |
1307 | 1307 | ||
1308 | } | 1308 | } |
1309 | #endif | 1309 | #endif |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 7bb5f07dbeef..2ba1dd22ad64 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c | |||
@@ -1165,8 +1165,8 @@ static void xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata, | |||
1165 | 1165 | ||
1166 | static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet) | 1166 | static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet) |
1167 | { | 1167 | { |
1168 | if (vlan_tx_tag_present(skb)) | 1168 | if (skb_vlan_tag_present(skb)) |
1169 | packet->vlan_ctag = vlan_tx_tag_get(skb); | 1169 | packet->vlan_ctag = skb_vlan_tag_get(skb); |
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | static int xgbe_prep_tso(struct sk_buff *skb, struct xgbe_packet_data *packet) | 1172 | 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, | |||
1247 | XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, | 1247 | XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, |
1248 | CSUM_ENABLE, 1); | 1248 | CSUM_ENABLE, 1); |
1249 | 1249 | ||
1250 | if (vlan_tx_tag_present(skb)) { | 1250 | if (skb_vlan_tag_present(skb)) { |
1251 | /* VLAN requires an extra descriptor if tag is different */ | 1251 | /* VLAN requires an extra descriptor if tag is different */ |
1252 | if (vlan_tx_tag_get(skb) != ring->tx.cur_vlan_ctag) | 1252 | if (skb_vlan_tag_get(skb) != ring->tx.cur_vlan_ctag) |
1253 | /* We can share with the TSO context descriptor */ | 1253 | /* We can share with the TSO context descriptor */ |
1254 | if (!context_desc) { | 1254 | if (!context_desc) { |
1255 | context_desc = 1; | 1255 | context_desc = 1; |
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index c9946c6c119e..587f63e87588 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -2235,8 +2235,8 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb, | |||
2235 | return NETDEV_TX_OK; | 2235 | return NETDEV_TX_OK; |
2236 | } | 2236 | } |
2237 | 2237 | ||
2238 | if (unlikely(vlan_tx_tag_present(skb))) { | 2238 | if (unlikely(skb_vlan_tag_present(skb))) { |
2239 | u16 vlan = vlan_tx_tag_get(skb); | 2239 | u16 vlan = skb_vlan_tag_get(skb); |
2240 | __le16 tag; | 2240 | __le16 tag; |
2241 | 2241 | ||
2242 | vlan = cpu_to_le16(vlan); | 2242 | vlan = cpu_to_le16(vlan); |
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c index c88abf5b6415..59a03a193e83 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c | |||
@@ -1892,8 +1892,8 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb, | |||
1892 | 1892 | ||
1893 | tpd = atl1e_get_tpd(adapter); | 1893 | tpd = atl1e_get_tpd(adapter); |
1894 | 1894 | ||
1895 | if (vlan_tx_tag_present(skb)) { | 1895 | if (skb_vlan_tag_present(skb)) { |
1896 | u16 vlan_tag = vlan_tx_tag_get(skb); | 1896 | u16 vlan_tag = skb_vlan_tag_get(skb); |
1897 | u16 atl1e_vlan_tag; | 1897 | u16 atl1e_vlan_tag; |
1898 | 1898 | ||
1899 | tpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; | 1899 | tpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index 2c8f398aeda9..eca1d113fee1 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -2415,8 +2415,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb, | |||
2415 | (u16) atomic_read(&tpd_ring->next_to_use)); | 2415 | (u16) atomic_read(&tpd_ring->next_to_use)); |
2416 | memset(ptpd, 0, sizeof(struct tx_packet_desc)); | 2416 | memset(ptpd, 0, sizeof(struct tx_packet_desc)); |
2417 | 2417 | ||
2418 | if (vlan_tx_tag_present(skb)) { | 2418 | if (skb_vlan_tag_present(skb)) { |
2419 | vlan_tag = vlan_tx_tag_get(skb); | 2419 | vlan_tag = skb_vlan_tag_get(skb); |
2420 | vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | | 2420 | vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | |
2421 | ((vlan_tag >> 9) & 0x8); | 2421 | ((vlan_tag >> 9) & 0x8); |
2422 | ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; | 2422 | ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 482a7cabb0a1..46a535318c7a 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -887,8 +887,8 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb, | |||
887 | offset = ((u32)(skb->len-copy_len + 3) & ~3); | 887 | offset = ((u32)(skb->len-copy_len + 3) & ~3); |
888 | } | 888 | } |
889 | #ifdef NETIF_F_HW_VLAN_CTAG_TX | 889 | #ifdef NETIF_F_HW_VLAN_CTAG_TX |
890 | if (vlan_tx_tag_present(skb)) { | 890 | if (skb_vlan_tag_present(skb)) { |
891 | u16 vlan_tag = vlan_tx_tag_get(skb); | 891 | u16 vlan_tag = skb_vlan_tag_get(skb); |
892 | vlan_tag = (vlan_tag << 4) | | 892 | vlan_tag = (vlan_tag << 4) | |
893 | (vlan_tag >> 13) | | 893 | (vlan_tag >> 13) | |
894 | ((vlan_tag >> 9) & 0x8); | 894 | ((vlan_tag >> 9) & 0x8); |
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 823d01c5684c..02bf0b86995b 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -6597,9 +6597,9 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6597 | vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; | 6597 | vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; |
6598 | } | 6598 | } |
6599 | 6599 | ||
6600 | if (vlan_tx_tag_present(skb)) { | 6600 | if (skb_vlan_tag_present(skb)) { |
6601 | vlan_tag_flags |= | 6601 | vlan_tag_flags |= |
6602 | (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); | 6602 | (TX_BD_FLAGS_VLAN_TAG | (skb_vlan_tag_get(skb) << 16)); |
6603 | } | 6603 | } |
6604 | 6604 | ||
6605 | if ((mss = skb_shinfo(skb)->gso_size)) { | 6605 | if ((mss = skb_shinfo(skb)->gso_size)) { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 1d1147c93d59..b51a18a09d4d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -3865,9 +3865,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3865 | "sending pkt %u @%p next_idx %u bd %u @%p\n", | 3865 | "sending pkt %u @%p next_idx %u bd %u @%p\n", |
3866 | pkt_prod, tx_buf, txdata->tx_pkt_prod, bd_prod, tx_start_bd); | 3866 | pkt_prod, tx_buf, txdata->tx_pkt_prod, bd_prod, tx_start_bd); |
3867 | 3867 | ||
3868 | if (vlan_tx_tag_present(skb)) { | 3868 | if (skb_vlan_tag_present(skb)) { |
3869 | tx_start_bd->vlan_or_ethertype = | 3869 | tx_start_bd->vlan_or_ethertype = |
3870 | cpu_to_le16(vlan_tx_tag_get(skb)); | 3870 | cpu_to_le16(skb_vlan_tag_get(skb)); |
3871 | tx_start_bd->bd_flags.as_bitfield |= | 3871 | tx_start_bd->bd_flags.as_bitfield |= |
3872 | (X_ETH_OUTBAND_VLAN << ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT); | 3872 | (X_ETH_OUTBAND_VLAN << ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT); |
3873 | } else { | 3873 | } else { |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 356bd5b022a5..4cf43bfbc955 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -8002,9 +8002,9 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
8002 | !mss && skb->len > VLAN_ETH_FRAME_LEN) | 8002 | !mss && skb->len > VLAN_ETH_FRAME_LEN) |
8003 | base_flags |= TXD_FLAG_JMB_PKT; | 8003 | base_flags |= TXD_FLAG_JMB_PKT; |
8004 | 8004 | ||
8005 | if (vlan_tx_tag_present(skb)) { | 8005 | if (skb_vlan_tag_present(skb)) { |
8006 | base_flags |= TXD_FLAG_VLAN; | 8006 | base_flags |= TXD_FLAG_VLAN; |
8007 | vlan = vlan_tx_tag_get(skb); | 8007 | vlan = skb_vlan_tag_get(skb); |
8008 | } | 8008 | } |
8009 | 8009 | ||
8010 | if ((unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) && | 8010 | if ((unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) && |
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index 323721838cf9..7714d7790089 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
@@ -2824,8 +2824,8 @@ bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb, | |||
2824 | u32 gso_size; | 2824 | u32 gso_size; |
2825 | u16 vlan_tag = 0; | 2825 | u16 vlan_tag = 0; |
2826 | 2826 | ||
2827 | if (vlan_tx_tag_present(skb)) { | 2827 | if (skb_vlan_tag_present(skb)) { |
2828 | vlan_tag = (u16)vlan_tx_tag_get(skb); | 2828 | vlan_tag = (u16)skb_vlan_tag_get(skb); |
2829 | flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN); | 2829 | flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN); |
2830 | } | 2830 | } |
2831 | if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags)) { | 2831 | if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags)) { |
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c index babe2a915b00..526ea74e82d9 100644 --- a/drivers/net/ethernet/chelsio/cxgb/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c | |||
@@ -1860,9 +1860,9 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1860 | } | 1860 | } |
1861 | cpl->iff = dev->if_port; | 1861 | cpl->iff = dev->if_port; |
1862 | 1862 | ||
1863 | if (vlan_tx_tag_present(skb)) { | 1863 | if (skb_vlan_tag_present(skb)) { |
1864 | cpl->vlan_valid = 1; | 1864 | cpl->vlan_valid = 1; |
1865 | cpl->vlan = htons(vlan_tx_tag_get(skb)); | 1865 | cpl->vlan = htons(skb_vlan_tag_get(skb)); |
1866 | st->vlan_insert++; | 1866 | st->vlan_insert++; |
1867 | } else | 1867 | } else |
1868 | cpl->vlan_valid = 0; | 1868 | cpl->vlan_valid = 0; |
diff --git a/drivers/net/ethernet/chelsio/cxgb3/sge.c b/drivers/net/ethernet/chelsio/cxgb3/sge.c index 3dfcf600fcc6..d6aa602f168d 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c | |||
@@ -1148,8 +1148,8 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb, | |||
1148 | cpl->len = htonl(skb->len); | 1148 | cpl->len = htonl(skb->len); |
1149 | cntrl = V_TXPKT_INTF(pi->port_id); | 1149 | cntrl = V_TXPKT_INTF(pi->port_id); |
1150 | 1150 | ||
1151 | if (vlan_tx_tag_present(skb)) | 1151 | if (skb_vlan_tag_present(skb)) |
1152 | cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(vlan_tx_tag_get(skb)); | 1152 | cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(skb_vlan_tag_get(skb)); |
1153 | 1153 | ||
1154 | tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size); | 1154 | tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size); |
1155 | if (tso_info) { | 1155 | if (tso_info) { |
@@ -1282,7 +1282,7 @@ netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1282 | qs->port_stats[SGE_PSTAT_TX_CSUM]++; | 1282 | qs->port_stats[SGE_PSTAT_TX_CSUM]++; |
1283 | if (skb_shinfo(skb)->gso_size) | 1283 | if (skb_shinfo(skb)->gso_size) |
1284 | qs->port_stats[SGE_PSTAT_TSO]++; | 1284 | qs->port_stats[SGE_PSTAT_TSO]++; |
1285 | if (vlan_tx_tag_present(skb)) | 1285 | if (skb_vlan_tag_present(skb)) |
1286 | qs->port_stats[SGE_PSTAT_VLANINS]++; | 1286 | qs->port_stats[SGE_PSTAT_VLANINS]++; |
1287 | 1287 | ||
1288 | /* | 1288 | /* |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index ca42e2e9dec9..619156112b21 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c | |||
@@ -1154,9 +1154,9 @@ out_free: dev_kfree_skb_any(skb); | |||
1154 | cntrl = TXPKT_L4CSUM_DIS | TXPKT_IPCSUM_DIS; | 1154 | cntrl = TXPKT_L4CSUM_DIS | TXPKT_IPCSUM_DIS; |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | if (vlan_tx_tag_present(skb)) { | 1157 | if (skb_vlan_tag_present(skb)) { |
1158 | q->vlan_ins++; | 1158 | q->vlan_ins++; |
1159 | cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb)); | 1159 | cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb)); |
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | cpl->ctrl0 = htonl(TXPKT_OPCODE(CPL_TX_PKT_XT) | | 1162 | cpl->ctrl0 = htonl(TXPKT_OPCODE(CPL_TX_PKT_XT) | |
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c index 4424277a7e4d..0545f0de1c52 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c | |||
@@ -1326,9 +1326,9 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1326 | * If there's a VLAN tag present, add that to the list of things to | 1326 | * If there's a VLAN tag present, add that to the list of things to |
1327 | * do in this Work Request. | 1327 | * do in this Work Request. |
1328 | */ | 1328 | */ |
1329 | if (vlan_tx_tag_present(skb)) { | 1329 | if (skb_vlan_tag_present(skb)) { |
1330 | txq->vlan_ins++; | 1330 | txq->vlan_ins++; |
1331 | cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb)); | 1331 | cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb)); |
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | /* | 1334 | /* |
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 9a952df6606e..0535f6fbdc71 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
@@ -520,10 +520,10 @@ static inline void enic_queue_wq_skb(struct enic *enic, | |||
520 | int loopback = 0; | 520 | int loopback = 0; |
521 | int err; | 521 | int err; |
522 | 522 | ||
523 | if (vlan_tx_tag_present(skb)) { | 523 | if (skb_vlan_tag_present(skb)) { |
524 | /* VLAN tag from trunking driver */ | 524 | /* VLAN tag from trunking driver */ |
525 | vlan_tag_insert = 1; | 525 | vlan_tag_insert = 1; |
526 | vlan_tag = vlan_tx_tag_get(skb); | 526 | vlan_tag = skb_vlan_tag_get(skb); |
527 | } else if (enic->loop_enable) { | 527 | } else if (enic->loop_enable) { |
528 | vlan_tag = enic->loop_tag; | 528 | vlan_tag = enic->loop_tag; |
529 | loopback = 1; | 529 | loopback = 1; |
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 37a26b0b7e33..ed46610e5453 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -694,7 +694,7 @@ static inline u16 be_get_tx_vlan_tag(struct be_adapter *adapter, | |||
694 | u8 vlan_prio; | 694 | u8 vlan_prio; |
695 | u16 vlan_tag; | 695 | u16 vlan_tag; |
696 | 696 | ||
697 | vlan_tag = vlan_tx_tag_get(skb); | 697 | vlan_tag = skb_vlan_tag_get(skb); |
698 | vlan_prio = (vlan_tag & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; | 698 | vlan_prio = (vlan_tag & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; |
699 | /* If vlan priority provided by OS is NOT in available bmap */ | 699 | /* If vlan priority provided by OS is NOT in available bmap */ |
700 | if (!(adapter->vlan_prio_bmap & (1 << vlan_prio))) | 700 | 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, | |||
745 | SET_TX_WRB_HDR_BITS(udpcs, hdr, 1); | 745 | SET_TX_WRB_HDR_BITS(udpcs, hdr, 1); |
746 | } | 746 | } |
747 | 747 | ||
748 | if (vlan_tx_tag_present(skb)) { | 748 | if (skb_vlan_tag_present(skb)) { |
749 | SET_TX_WRB_HDR_BITS(vlan, hdr, 1); | 749 | SET_TX_WRB_HDR_BITS(vlan, hdr, 1); |
750 | vlan_tag = be_get_tx_vlan_tag(adapter, skb); | 750 | vlan_tag = be_get_tx_vlan_tag(adapter, skb); |
751 | SET_TX_WRB_HDR_BITS(vlan_tag, hdr, vlan_tag); | 751 | 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, | |||
864 | if (unlikely(!skb)) | 864 | if (unlikely(!skb)) |
865 | return skb; | 865 | return skb; |
866 | 866 | ||
867 | if (vlan_tx_tag_present(skb)) | 867 | if (skb_vlan_tag_present(skb)) |
868 | vlan_tag = be_get_tx_vlan_tag(adapter, skb); | 868 | vlan_tag = be_get_tx_vlan_tag(adapter, skb); |
869 | 869 | ||
870 | if (qnq_async_evt_rcvd(adapter) && adapter->pvid) { | 870 | if (qnq_async_evt_rcvd(adapter) && adapter->pvid) { |
@@ -923,7 +923,7 @@ static bool be_ipv6_exthdr_check(struct sk_buff *skb) | |||
923 | 923 | ||
924 | static int be_vlan_tag_tx_chk(struct be_adapter *adapter, struct sk_buff *skb) | 924 | static int be_vlan_tag_tx_chk(struct be_adapter *adapter, struct sk_buff *skb) |
925 | { | 925 | { |
926 | return vlan_tx_tag_present(skb) || adapter->pvid || adapter->qnq_vid; | 926 | return skb_vlan_tag_present(skb) || adapter->pvid || adapter->qnq_vid; |
927 | } | 927 | } |
928 | 928 | ||
929 | static int be_ipv6_tx_stall_chk(struct be_adapter *adapter, struct sk_buff *skb) | 929 | 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, | |||
946 | eth_hdr_len = ntohs(skb->protocol) == ETH_P_8021Q ? | 946 | eth_hdr_len = ntohs(skb->protocol) == ETH_P_8021Q ? |
947 | VLAN_ETH_HLEN : ETH_HLEN; | 947 | VLAN_ETH_HLEN : ETH_HLEN; |
948 | if (skb->len <= 60 && | 948 | if (skb->len <= 60 && |
949 | (lancer_chip(adapter) || vlan_tx_tag_present(skb)) && | 949 | (lancer_chip(adapter) || skb_vlan_tag_present(skb)) && |
950 | is_ipv4_pkt(skb)) { | 950 | is_ipv4_pkt(skb)) { |
951 | ip = (struct iphdr *)ip_hdr(skb); | 951 | ip = (struct iphdr *)ip_hdr(skb); |
952 | pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len)); | 952 | 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, | |||
964 | * Manually insert VLAN in pkt. | 964 | * Manually insert VLAN in pkt. |
965 | */ | 965 | */ |
966 | if (skb->ip_summed != CHECKSUM_PARTIAL && | 966 | if (skb->ip_summed != CHECKSUM_PARTIAL && |
967 | vlan_tx_tag_present(skb)) { | 967 | skb_vlan_tag_present(skb)) { |
968 | skb = be_insert_vlan_in_pkt(adapter, skb, skip_hw_vlan); | 968 | skb = be_insert_vlan_in_pkt(adapter, skb, skip_hw_vlan); |
969 | if (unlikely(!skb)) | 969 | if (unlikely(!skb)) |
970 | goto err; | 970 | goto err; |
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index e54b1e39f9b4..93ff846e96f1 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -2170,7 +2170,7 @@ static inline void gfar_tx_checksum(struct sk_buff *skb, struct txfcb *fcb, | |||
2170 | void inline gfar_tx_vlan(struct sk_buff *skb, struct txfcb *fcb) | 2170 | void inline gfar_tx_vlan(struct sk_buff *skb, struct txfcb *fcb) |
2171 | { | 2171 | { |
2172 | fcb->flags |= TXFCB_VLN; | 2172 | fcb->flags |= TXFCB_VLN; |
2173 | fcb->vlctl = vlan_tx_tag_get(skb); | 2173 | fcb->vlctl = skb_vlan_tag_get(skb); |
2174 | } | 2174 | } |
2175 | 2175 | ||
2176 | static inline struct txbd8 *skip_txbd(struct txbd8 *bdp, int stride, | 2176 | 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) | |||
2230 | regs = tx_queue->grp->regs; | 2230 | regs = tx_queue->grp->regs; |
2231 | 2231 | ||
2232 | do_csum = (CHECKSUM_PARTIAL == skb->ip_summed); | 2232 | do_csum = (CHECKSUM_PARTIAL == skb->ip_summed); |
2233 | do_vlan = vlan_tx_tag_present(skb); | 2233 | do_vlan = skb_vlan_tag_present(skb); |
2234 | do_tstamp = (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && | 2234 | do_tstamp = (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && |
2235 | priv->hwts_tx_en; | 2235 | priv->hwts_tx_en; |
2236 | 2236 | ||
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 566b17db135a..e8a1adb7a962 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -2064,9 +2064,9 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2064 | memset(swqe, 0, SWQE_HEADER_SIZE); | 2064 | memset(swqe, 0, SWQE_HEADER_SIZE); |
2065 | atomic_dec(&pr->swqe_avail); | 2065 | atomic_dec(&pr->swqe_avail); |
2066 | 2066 | ||
2067 | if (vlan_tx_tag_present(skb)) { | 2067 | if (skb_vlan_tag_present(skb)) { |
2068 | swqe->tx_control |= EHEA_SWQE_VLAN_INSERT; | 2068 | swqe->tx_control |= EHEA_SWQE_VLAN_INSERT; |
2069 | swqe->vlan_tag = vlan_tx_tag_get(skb); | 2069 | swqe->vlan_tag = skb_vlan_tag_get(skb); |
2070 | } | 2070 | } |
2071 | 2071 | ||
2072 | pr->tx_packets++; | 2072 | pr->tx_packets++; |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 83140cbb5f01..9242982db3e0 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -3226,9 +3226,10 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, | |||
3226 | return NETDEV_TX_BUSY; | 3226 | return NETDEV_TX_BUSY; |
3227 | } | 3227 | } |
3228 | 3228 | ||
3229 | if (vlan_tx_tag_present(skb)) { | 3229 | if (skb_vlan_tag_present(skb)) { |
3230 | tx_flags |= E1000_TX_FLAGS_VLAN; | 3230 | tx_flags |= E1000_TX_FLAGS_VLAN; |
3231 | tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT); | 3231 | tx_flags |= (skb_vlan_tag_get(skb) << |
3232 | E1000_TX_FLAGS_VLAN_SHIFT); | ||
3232 | } | 3233 | } |
3233 | 3234 | ||
3234 | first = tx_ring->next_to_use; | 3235 | first = tx_ring->next_to_use; |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 332a298e95b5..38cb586b1bf4 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -5463,8 +5463,8 @@ static int e1000_transfer_dhcp_info(struct e1000_adapter *adapter, | |||
5463 | struct e1000_hw *hw = &adapter->hw; | 5463 | struct e1000_hw *hw = &adapter->hw; |
5464 | u16 length, offset; | 5464 | u16 length, offset; |
5465 | 5465 | ||
5466 | if (vlan_tx_tag_present(skb) && | 5466 | if (skb_vlan_tag_present(skb) && |
5467 | !((vlan_tx_tag_get(skb) == adapter->hw.mng_cookie.vlan_id) && | 5467 | !((skb_vlan_tag_get(skb) == adapter->hw.mng_cookie.vlan_id) && |
5468 | (adapter->hw.mng_cookie.status & | 5468 | (adapter->hw.mng_cookie.status & |
5469 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN))) | 5469 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN))) |
5470 | return 0; | 5470 | return 0; |
@@ -5603,9 +5603,10 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, | |||
5603 | if (e1000_maybe_stop_tx(tx_ring, count + 2)) | 5603 | if (e1000_maybe_stop_tx(tx_ring, count + 2)) |
5604 | return NETDEV_TX_BUSY; | 5604 | return NETDEV_TX_BUSY; |
5605 | 5605 | ||
5606 | if (vlan_tx_tag_present(skb)) { | 5606 | if (skb_vlan_tag_present(skb)) { |
5607 | tx_flags |= E1000_TX_FLAGS_VLAN; | 5607 | tx_flags |= E1000_TX_FLAGS_VLAN; |
5608 | tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT); | 5608 | tx_flags |= (skb_vlan_tag_get(skb) << |
5609 | E1000_TX_FLAGS_VLAN_SHIFT); | ||
5609 | } | 5610 | } |
5610 | 5611 | ||
5611 | first = tx_ring->next_to_use; | 5612 | first = tx_ring->next_to_use; |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c index eb088b129bc7..caa43f7c2931 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c | |||
@@ -965,8 +965,8 @@ static void fm10k_tx_map(struct fm10k_ring *tx_ring, | |||
965 | tx_desc = FM10K_TX_DESC(tx_ring, i); | 965 | tx_desc = FM10K_TX_DESC(tx_ring, i); |
966 | 966 | ||
967 | /* add HW VLAN tag */ | 967 | /* add HW VLAN tag */ |
968 | if (vlan_tx_tag_present(skb)) | 968 | if (skb_vlan_tag_present(skb)) |
969 | tx_desc->vlan = cpu_to_le16(vlan_tx_tag_get(skb)); | 969 | tx_desc->vlan = cpu_to_le16(skb_vlan_tag_get(skb)); |
970 | else | 970 | else |
971 | tx_desc->vlan = 0; | 971 | tx_desc->vlan = 0; |
972 | 972 | ||
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c index 8811364b91cb..945b35d31c71 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | |||
@@ -609,7 +609,7 @@ static netdev_tx_t fm10k_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
609 | int err; | 609 | int err; |
610 | 610 | ||
611 | if ((skb->protocol == htons(ETH_P_8021Q)) && | 611 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
612 | !vlan_tx_tag_present(skb)) { | 612 | !skb_vlan_tag_present(skb)) { |
613 | /* FM10K only supports hardware tagging, any tags in frame | 613 | /* FM10K only supports hardware tagging, any tags in frame |
614 | * are considered 2nd level or "outer" tags | 614 | * are considered 2nd level or "outer" tags |
615 | */ | 615 | */ |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 04b441460bbd..9f536dd8e1ec 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c | |||
@@ -1772,8 +1772,8 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb, | |||
1772 | u32 tx_flags = 0; | 1772 | u32 tx_flags = 0; |
1773 | 1773 | ||
1774 | /* if we have a HW VLAN tag being added, default to the HW one */ | 1774 | /* if we have a HW VLAN tag being added, default to the HW one */ |
1775 | if (vlan_tx_tag_present(skb)) { | 1775 | if (skb_vlan_tag_present(skb)) { |
1776 | tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; | 1776 | tx_flags |= skb_vlan_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; |
1777 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; | 1777 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; |
1778 | /* else if it is a SW VLAN, check the next protocol and store the tag */ | 1778 | /* else if it is a SW VLAN, check the next protocol and store the tag */ |
1779 | } else if (protocol == htons(ETH_P_8021Q)) { | 1779 | } else if (protocol == htons(ETH_P_8021Q)) { |
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c index 04c7c1557a0c..82c3798fdd36 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c | |||
@@ -1122,8 +1122,8 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb, | |||
1122 | u32 tx_flags = 0; | 1122 | u32 tx_flags = 0; |
1123 | 1123 | ||
1124 | /* if we have a HW VLAN tag being added, default to the HW one */ | 1124 | /* if we have a HW VLAN tag being added, default to the HW one */ |
1125 | if (vlan_tx_tag_present(skb)) { | 1125 | if (skb_vlan_tag_present(skb)) { |
1126 | tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; | 1126 | tx_flags |= skb_vlan_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; |
1127 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; | 1127 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; |
1128 | /* else if it is a SW VLAN, check the next protocol and store the tag */ | 1128 | /* else if it is a SW VLAN, check the next protocol and store the tag */ |
1129 | } else if (protocol == htons(ETH_P_8021Q)) { | 1129 | } else if (protocol == htons(ETH_P_8021Q)) { |
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index ff59897a9463..6c25ec314183 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -5035,9 +5035,9 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb, | |||
5035 | 5035 | ||
5036 | skb_tx_timestamp(skb); | 5036 | skb_tx_timestamp(skb); |
5037 | 5037 | ||
5038 | if (vlan_tx_tag_present(skb)) { | 5038 | if (skb_vlan_tag_present(skb)) { |
5039 | tx_flags |= IGB_TX_FLAGS_VLAN; | 5039 | tx_flags |= IGB_TX_FLAGS_VLAN; |
5040 | tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT); | 5040 | tx_flags |= (skb_vlan_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT); |
5041 | } | 5041 | } |
5042 | 5042 | ||
5043 | /* record initial flags and protocol */ | 5043 | /* record initial flags and protocol */ |
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 63c807c9b21c..ad2b4897b392 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c | |||
@@ -2234,9 +2234,10 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb, | |||
2234 | return NETDEV_TX_BUSY; | 2234 | return NETDEV_TX_BUSY; |
2235 | } | 2235 | } |
2236 | 2236 | ||
2237 | if (vlan_tx_tag_present(skb)) { | 2237 | if (skb_vlan_tag_present(skb)) { |
2238 | tx_flags |= IGBVF_TX_FLAGS_VLAN; | 2238 | tx_flags |= IGBVF_TX_FLAGS_VLAN; |
2239 | tx_flags |= (vlan_tx_tag_get(skb) << IGBVF_TX_FLAGS_VLAN_SHIFT); | 2239 | tx_flags |= (skb_vlan_tag_get(skb) << |
2240 | IGBVF_TX_FLAGS_VLAN_SHIFT); | ||
2240 | } | 2241 | } |
2241 | 2242 | ||
2242 | if (skb->protocol == htons(ETH_P_IP)) | 2243 | if (skb->protocol == htons(ETH_P_IP)) |
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c index aa87605b144a..11a1bdbe3fd9 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c | |||
@@ -1532,9 +1532,9 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1532 | DESC_NEEDED))) | 1532 | DESC_NEEDED))) |
1533 | return NETDEV_TX_BUSY; | 1533 | return NETDEV_TX_BUSY; |
1534 | 1534 | ||
1535 | if (vlan_tx_tag_present(skb)) { | 1535 | if (skb_vlan_tag_present(skb)) { |
1536 | tx_flags |= IXGB_TX_FLAGS_VLAN; | 1536 | tx_flags |= IXGB_TX_FLAGS_VLAN; |
1537 | vlan_id = vlan_tx_tag_get(skb); | 1537 | vlan_id = skb_vlan_tag_get(skb); |
1538 | } | 1538 | } |
1539 | 1539 | ||
1540 | first = adapter->tx_ring.next_to_use; | 1540 | first = adapter->tx_ring.next_to_use; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 2ed2c7de2304..7bb421bfd84e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -7217,8 +7217,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | |||
7217 | first->gso_segs = 1; | 7217 | first->gso_segs = 1; |
7218 | 7218 | ||
7219 | /* if we have a HW VLAN tag being added default to the HW one */ | 7219 | /* if we have a HW VLAN tag being added default to the HW one */ |
7220 | if (vlan_tx_tag_present(skb)) { | 7220 | if (skb_vlan_tag_present(skb)) { |
7221 | tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; | 7221 | tx_flags |= skb_vlan_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; |
7222 | tx_flags |= IXGBE_TX_FLAGS_HW_VLAN; | 7222 | tx_flags |= IXGBE_TX_FLAGS_HW_VLAN; |
7223 | /* else if it is a SW VLAN check the next protocol and store the tag */ | 7223 | /* else if it is a SW VLAN check the next protocol and store the tag */ |
7224 | } else if (protocol == htons(ETH_P_8021Q)) { | 7224 | } else if (protocol == htons(ETH_P_8021Q)) { |
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 62a0d8e0f17d..c9b49bfb51bb 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -3452,8 +3452,8 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3452 | first->bytecount = skb->len; | 3452 | first->bytecount = skb->len; |
3453 | first->gso_segs = 1; | 3453 | first->gso_segs = 1; |
3454 | 3454 | ||
3455 | if (vlan_tx_tag_present(skb)) { | 3455 | if (skb_vlan_tag_present(skb)) { |
3456 | tx_flags |= vlan_tx_tag_get(skb); | 3456 | tx_flags |= skb_vlan_tag_get(skb); |
3457 | tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; | 3457 | tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; |
3458 | tx_flags |= IXGBE_TX_FLAGS_VLAN; | 3458 | tx_flags |= IXGBE_TX_FLAGS_VLAN; |
3459 | } | 3459 | } |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 44ce7d88f554..6e9a792097d3 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -2154,9 +2154,9 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags) | |||
2154 | static inline void | 2154 | static inline void |
2155 | jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags) | 2155 | jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags) |
2156 | { | 2156 | { |
2157 | if (vlan_tx_tag_present(skb)) { | 2157 | if (skb_vlan_tag_present(skb)) { |
2158 | *flags |= TXFLAG_TAGON; | 2158 | *flags |= TXFLAG_TAGON; |
2159 | *vlan = cpu_to_le16(vlan_tx_tag_get(skb)); | 2159 | *vlan = cpu_to_le16(skb_vlan_tag_get(skb)); |
2160 | } | 2160 | } |
2161 | } | 2161 | } |
2162 | 2162 | ||
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 867a6a3ef81f..d9f4498832a1 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1895,14 +1895,14 @@ static netdev_tx_t sky2_xmit_frame(struct sk_buff *skb, | |||
1895 | ctrl = 0; | 1895 | ctrl = 0; |
1896 | 1896 | ||
1897 | /* Add VLAN tag, can piggyback on LRGLEN or ADDR64 */ | 1897 | /* Add VLAN tag, can piggyback on LRGLEN or ADDR64 */ |
1898 | if (vlan_tx_tag_present(skb)) { | 1898 | if (skb_vlan_tag_present(skb)) { |
1899 | if (!le) { | 1899 | if (!le) { |
1900 | le = get_tx_le(sky2, &slot); | 1900 | le = get_tx_le(sky2, &slot); |
1901 | le->addr = 0; | 1901 | le->addr = 0; |
1902 | le->opcode = OP_VLAN|HW_OWNER; | 1902 | le->opcode = OP_VLAN|HW_OWNER; |
1903 | } else | 1903 | } else |
1904 | le->opcode |= OP_VLAN; | 1904 | le->opcode |= OP_VLAN; |
1905 | le->length = cpu_to_be16(vlan_tx_tag_get(skb)); | 1905 | le->length = cpu_to_be16(skb_vlan_tag_get(skb)); |
1906 | ctrl |= INS_VLAN; | 1906 | ctrl |= INS_VLAN; |
1907 | } | 1907 | } |
1908 | 1908 | ||
@@ -2594,7 +2594,7 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2594 | sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; | 2594 | sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; |
2595 | prefetch(sky2->rx_ring + sky2->rx_next); | 2595 | prefetch(sky2->rx_ring + sky2->rx_next); |
2596 | 2596 | ||
2597 | if (vlan_tx_tag_present(re->skb)) | 2597 | if (skb_vlan_tag_present(re->skb)) |
2598 | count -= VLAN_HLEN; /* Account for vlan tag */ | 2598 | count -= VLAN_HLEN; /* Account for vlan tag */ |
2599 | 2599 | ||
2600 | /* This chip has hardware problems that generates bogus status. | 2600 | /* This chip has hardware problems that generates bogus status. |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index e3357bf523df..359bb1286eb5 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -682,8 +682,8 @@ u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb, | |||
682 | if (dev->num_tc) | 682 | if (dev->num_tc) |
683 | return skb_tx_hash(dev, skb); | 683 | return skb_tx_hash(dev, skb); |
684 | 684 | ||
685 | if (vlan_tx_tag_present(skb)) | 685 | if (skb_vlan_tag_present(skb)) |
686 | up = vlan_tx_tag_get(skb) >> VLAN_PRIO_SHIFT; | 686 | up = skb_vlan_tag_get(skb) >> VLAN_PRIO_SHIFT; |
687 | 687 | ||
688 | return fallback(dev, skb) % rings_p_up + up * rings_p_up; | 688 | return fallback(dev, skb) % rings_p_up + up * rings_p_up; |
689 | } | 689 | } |
@@ -742,8 +742,8 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) | |||
742 | goto tx_drop; | 742 | goto tx_drop; |
743 | } | 743 | } |
744 | 744 | ||
745 | if (vlan_tx_tag_present(skb)) | 745 | if (skb_vlan_tag_present(skb)) |
746 | vlan_tag = vlan_tx_tag_get(skb); | 746 | vlan_tag = skb_vlan_tag_get(skb); |
747 | 747 | ||
748 | 748 | ||
749 | netdev_txq_bql_enqueue_prefetchw(ring->tx_queue); | 749 | 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) | |||
930 | real_size = (real_size / 16) & 0x3f; | 930 | real_size = (real_size / 16) & 0x3f; |
931 | 931 | ||
932 | if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && | 932 | if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && |
933 | !vlan_tx_tag_present(skb) && send_doorbell) { | 933 | !skb_vlan_tag_present(skb) && send_doorbell) { |
934 | tx_desc->ctrl.bf_qpn = ring->doorbell_qpn | | 934 | tx_desc->ctrl.bf_qpn = ring->doorbell_qpn | |
935 | cpu_to_be32(real_size); | 935 | cpu_to_be32(real_size); |
936 | 936 | ||
@@ -952,7 +952,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) | |||
952 | } else { | 952 | } else { |
953 | tx_desc->ctrl.vlan_tag = cpu_to_be16(vlan_tag); | 953 | tx_desc->ctrl.vlan_tag = cpu_to_be16(vlan_tag); |
954 | tx_desc->ctrl.ins_vlan = MLX4_WQE_CTRL_INS_VLAN * | 954 | tx_desc->ctrl.ins_vlan = MLX4_WQE_CTRL_INS_VLAN * |
955 | !!vlan_tx_tag_present(skb); | 955 | !!skb_vlan_tag_present(skb); |
956 | tx_desc->ctrl.fence_size = real_size; | 956 | tx_desc->ctrl.fence_size = real_size; |
957 | 957 | ||
958 | /* Ensure new descriptor hits memory | 958 | /* Ensure new descriptor hits memory |
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c index 2552e550a78c..eb807b0dc72a 100644 --- a/drivers/net/ethernet/natsemi/ns83820.c +++ b/drivers/net/ethernet/natsemi/ns83820.c | |||
@@ -1122,12 +1122,12 @@ again: | |||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | 1124 | #ifdef NS83820_VLAN_ACCEL_SUPPORT |
1125 | if(vlan_tx_tag_present(skb)) { | 1125 | if (skb_vlan_tag_present(skb)) { |
1126 | /* fetch the vlan tag info out of the | 1126 | /* fetch the vlan tag info out of the |
1127 | * ancillary data if the vlan code | 1127 | * ancillary data if the vlan code |
1128 | * is using hw vlan acceleration | 1128 | * is using hw vlan acceleration |
1129 | */ | 1129 | */ |
1130 | short tag = vlan_tx_tag_get(skb); | 1130 | short tag = skb_vlan_tag_get(skb); |
1131 | extsts |= (EXTSTS_VPKT | htons(tag)); | 1131 | extsts |= (EXTSTS_VPKT | htons(tag)); |
1132 | } | 1132 | } |
1133 | #endif | 1133 | #endif |
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index f5e4b820128b..0529cad75b10 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -4045,8 +4045,8 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4045 | } | 4045 | } |
4046 | 4046 | ||
4047 | queue = 0; | 4047 | queue = 0; |
4048 | if (vlan_tx_tag_present(skb)) | 4048 | if (skb_vlan_tag_present(skb)) |
4049 | vlan_tag = vlan_tx_tag_get(skb); | 4049 | vlan_tag = skb_vlan_tag_get(skb); |
4050 | if (sp->config.tx_steering_type == TX_DEFAULT_STEERING) { | 4050 | if (sp->config.tx_steering_type == TX_DEFAULT_STEERING) { |
4051 | if (skb->protocol == htons(ETH_P_IP)) { | 4051 | if (skb->protocol == htons(ETH_P_IP)) { |
4052 | struct iphdr *ip; | 4052 | struct iphdr *ip; |
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index cc0485e3c621..50d5604833ed 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c | |||
@@ -890,8 +890,8 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev) | |||
890 | dev->name, __func__, __LINE__, | 890 | dev->name, __func__, __LINE__, |
891 | fifo_hw, dtr, dtr_priv); | 891 | fifo_hw, dtr, dtr_priv); |
892 | 892 | ||
893 | if (vlan_tx_tag_present(skb)) { | 893 | if (skb_vlan_tag_present(skb)) { |
894 | u16 vlan_tag = vlan_tx_tag_get(skb); | 894 | u16 vlan_tag = skb_vlan_tag_get(skb); |
895 | vxge_hw_fifo_txdl_vlan_set(dtr, vlan_tag); | 895 | vxge_hw_fifo_txdl_vlan_set(dtr, vlan_tag); |
896 | } | 896 | } |
897 | 897 | ||
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index f39cae620f61..a41bb5e6b954 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c | |||
@@ -2462,9 +2462,9 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
2462 | NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; | 2462 | NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; |
2463 | 2463 | ||
2464 | /* vlan tag */ | 2464 | /* vlan tag */ |
2465 | if (vlan_tx_tag_present(skb)) | 2465 | if (skb_vlan_tag_present(skb)) |
2466 | start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT | | 2466 | start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT | |
2467 | vlan_tx_tag_get(skb)); | 2467 | skb_vlan_tag_get(skb)); |
2468 | else | 2468 | else |
2469 | start_tx->txvlan = 0; | 2469 | start_tx->txvlan = 0; |
2470 | 2470 | ||
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index 613037584d08..a47fe67fdf58 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | |||
@@ -1893,9 +1893,9 @@ netxen_tso_check(struct net_device *netdev, | |||
1893 | protocol = vh->h_vlan_encapsulated_proto; | 1893 | protocol = vh->h_vlan_encapsulated_proto; |
1894 | flags = FLAGS_VLAN_TAGGED; | 1894 | flags = FLAGS_VLAN_TAGGED; |
1895 | 1895 | ||
1896 | } else if (vlan_tx_tag_present(skb)) { | 1896 | } else if (skb_vlan_tag_present(skb)) { |
1897 | flags = FLAGS_VLAN_OOB; | 1897 | flags = FLAGS_VLAN_OOB; |
1898 | vid = vlan_tx_tag_get(skb); | 1898 | vid = skb_vlan_tag_get(skb); |
1899 | netxen_set_tx_vlan_tci(first_desc, vid); | 1899 | netxen_set_tx_vlan_tci(first_desc, vid); |
1900 | vlan_oob = 1; | 1900 | vlan_oob = 1; |
1901 | } | 1901 | } |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c index d166e534925d..4d2496f28b85 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | |||
@@ -321,8 +321,8 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter, | |||
321 | if (protocol == ETH_P_8021Q) { | 321 | if (protocol == ETH_P_8021Q) { |
322 | vh = (struct vlan_ethhdr *)skb->data; | 322 | vh = (struct vlan_ethhdr *)skb->data; |
323 | vlan_id = ntohs(vh->h_vlan_TCI); | 323 | vlan_id = ntohs(vh->h_vlan_TCI); |
324 | } else if (vlan_tx_tag_present(skb)) { | 324 | } else if (skb_vlan_tag_present(skb)) { |
325 | vlan_id = vlan_tx_tag_get(skb); | 325 | vlan_id = skb_vlan_tag_get(skb); |
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||
@@ -473,9 +473,9 @@ static int qlcnic_tx_pkt(struct qlcnic_adapter *adapter, | |||
473 | flags = QLCNIC_FLAGS_VLAN_TAGGED; | 473 | flags = QLCNIC_FLAGS_VLAN_TAGGED; |
474 | vlan_tci = ntohs(vh->h_vlan_TCI); | 474 | vlan_tci = ntohs(vh->h_vlan_TCI); |
475 | protocol = ntohs(vh->h_vlan_encapsulated_proto); | 475 | protocol = ntohs(vh->h_vlan_encapsulated_proto); |
476 | } else if (vlan_tx_tag_present(skb)) { | 476 | } else if (skb_vlan_tag_present(skb)) { |
477 | flags = QLCNIC_FLAGS_VLAN_OOB; | 477 | flags = QLCNIC_FLAGS_VLAN_OOB; |
478 | vlan_tci = vlan_tx_tag_get(skb); | 478 | vlan_tci = skb_vlan_tag_get(skb); |
479 | } | 479 | } |
480 | if (unlikely(adapter->tx_pvid)) { | 480 | if (unlikely(adapter->tx_pvid)) { |
481 | if (vlan_tci && !(adapter->flags & QLCNIC_TAGGING_ENABLED)) | 481 | if (vlan_tci && !(adapter->flags & QLCNIC_TAGGING_ENABLED)) |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index 6c904a6cad2a..dc0058f90370 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c | |||
@@ -2660,11 +2660,11 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev) | |||
2660 | 2660 | ||
2661 | mac_iocb_ptr->frame_len = cpu_to_le16((u16) skb->len); | 2661 | mac_iocb_ptr->frame_len = cpu_to_le16((u16) skb->len); |
2662 | 2662 | ||
2663 | if (vlan_tx_tag_present(skb)) { | 2663 | if (skb_vlan_tag_present(skb)) { |
2664 | netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev, | 2664 | netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev, |
2665 | "Adding a vlan tag %d.\n", vlan_tx_tag_get(skb)); | 2665 | "Adding a vlan tag %d.\n", skb_vlan_tag_get(skb)); |
2666 | mac_iocb_ptr->flags3 |= OB_MAC_IOCB_V; | 2666 | mac_iocb_ptr->flags3 |= OB_MAC_IOCB_V; |
2667 | mac_iocb_ptr->vlan_tci = cpu_to_le16(vlan_tx_tag_get(skb)); | 2667 | mac_iocb_ptr->vlan_tci = cpu_to_le16(skb_vlan_tag_get(skb)); |
2668 | } | 2668 | } |
2669 | tso = ql_tso(skb, (struct ob_mac_tso_iocb_req *)mac_iocb_ptr); | 2669 | tso = ql_tso(skb, (struct ob_mac_tso_iocb_req *)mac_iocb_ptr); |
2670 | if (tso < 0) { | 2670 | if (tso < 0) { |
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index 9c31e46d1eee..d79e33b3c191 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -708,8 +708,8 @@ static void cp_tx (struct cp_private *cp) | |||
708 | 708 | ||
709 | static inline u32 cp_tx_vlan_tag(struct sk_buff *skb) | 709 | static inline u32 cp_tx_vlan_tag(struct sk_buff *skb) |
710 | { | 710 | { |
711 | return vlan_tx_tag_present(skb) ? | 711 | return skb_vlan_tag_present(skb) ? |
712 | TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00; | 712 | TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00; |
713 | } | 713 | } |
714 | 714 | ||
715 | static void unwind_tx_frag_mapping(struct cp_private *cp, struct sk_buff *skb, | 715 | static void unwind_tx_frag_mapping(struct cp_private *cp, struct sk_buff *skb, |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 3a280598a15a..cd286b0356ab 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -2073,8 +2073,8 @@ static int rtl8169_set_features(struct net_device *dev, | |||
2073 | 2073 | ||
2074 | static inline u32 rtl8169_tx_vlan_tag(struct sk_buff *skb) | 2074 | static inline u32 rtl8169_tx_vlan_tag(struct sk_buff *skb) |
2075 | { | 2075 | { |
2076 | return (vlan_tx_tag_present(skb)) ? | 2076 | return (skb_vlan_tag_present(skb)) ? |
2077 | TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00; | 2077 | TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00; |
2078 | } | 2078 | } |
2079 | 2079 | ||
2080 | static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb) | 2080 | static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb) |
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index b6612d6090ac..23545e1e605a 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | |||
@@ -1272,7 +1272,7 @@ static netdev_tx_t sxgbe_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1272 | if (unlikely(skb_is_gso(skb) && tqueue->prev_mss != cur_mss)) | 1272 | if (unlikely(skb_is_gso(skb) && tqueue->prev_mss != cur_mss)) |
1273 | ctxt_desc_req = 1; | 1273 | ctxt_desc_req = 1; |
1274 | 1274 | ||
1275 | if (unlikely(vlan_tx_tag_present(skb) || | 1275 | if (unlikely(skb_vlan_tag_present(skb) || |
1276 | ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && | 1276 | ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && |
1277 | tqueue->hwts_tx_en))) | 1277 | tqueue->hwts_tx_en))) |
1278 | ctxt_desc_req = 1; | 1278 | ctxt_desc_req = 1; |
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index 6ab36d9ff2ab..a9cac8413e49 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c | |||
@@ -1650,9 +1650,9 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb, | |||
1650 | txd_mss); | 1650 | txd_mss); |
1651 | } | 1651 | } |
1652 | 1652 | ||
1653 | if (vlan_tx_tag_present(skb)) { | 1653 | if (skb_vlan_tag_present(skb)) { |
1654 | /*Cut VLAN ID to 12 bits */ | 1654 | /*Cut VLAN ID to 12 bits */ |
1655 | txd_vlan_id = vlan_tx_tag_get(skb) & BITS_MASK(12); | 1655 | txd_vlan_id = skb_vlan_tag_get(skb) & BITS_MASK(12); |
1656 | txd_vtag = 1; | 1656 | txd_vtag = 1; |
1657 | } | 1657 | } |
1658 | 1658 | ||
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index a191afc23b56..0ac76102b33d 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c | |||
@@ -1781,8 +1781,8 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb, | |||
1781 | rp->tx_ring[entry].desc_length = | 1781 | rp->tx_ring[entry].desc_length = |
1782 | cpu_to_le32(TXDESC | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN)); | 1782 | cpu_to_le32(TXDESC | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN)); |
1783 | 1783 | ||
1784 | if (unlikely(vlan_tx_tag_present(skb))) { | 1784 | if (unlikely(skb_vlan_tag_present(skb))) { |
1785 | u16 vid_pcp = vlan_tx_tag_get(skb); | 1785 | u16 vid_pcp = skb_vlan_tag_get(skb); |
1786 | 1786 | ||
1787 | /* drop CFI/DEI bit, register needs VID and PCP */ | 1787 | /* drop CFI/DEI bit, register needs VID and PCP */ |
1788 | vid_pcp = (vid_pcp & VLAN_VID_MASK) | | 1788 | vid_pcp = (vid_pcp & VLAN_VID_MASK) | |
@@ -1803,7 +1803,7 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb, | |||
1803 | 1803 | ||
1804 | /* Non-x86 Todo: explicitly flush cache lines here. */ | 1804 | /* Non-x86 Todo: explicitly flush cache lines here. */ |
1805 | 1805 | ||
1806 | if (vlan_tx_tag_present(skb)) | 1806 | if (skb_vlan_tag_present(skb)) |
1807 | /* Tx queues are bits 7-0 (first Tx queue: bit 7) */ | 1807 | /* Tx queues are bits 7-0 (first Tx queue: bit 7) */ |
1808 | BYTE_REG_BITS_ON(1 << 7, ioaddr + TQWake); | 1808 | BYTE_REG_BITS_ON(1 << 7, ioaddr + TQWake); |
1809 | 1809 | ||
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c index 282f83a63b67..c20206f83cc1 100644 --- a/drivers/net/ethernet/via/via-velocity.c +++ b/drivers/net/ethernet/via/via-velocity.c | |||
@@ -2611,8 +2611,8 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, | |||
2611 | 2611 | ||
2612 | td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16; | 2612 | td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16; |
2613 | 2613 | ||
2614 | if (vlan_tx_tag_present(skb)) { | 2614 | if (skb_vlan_tag_present(skb)) { |
2615 | td_ptr->tdesc1.vlan = cpu_to_le16(vlan_tx_tag_get(skb)); | 2615 | td_ptr->tdesc1.vlan = cpu_to_le16(skb_vlan_tag_get(skb)); |
2616 | td_ptr->tdesc1.TCR |= TCR0_VETAG; | 2616 | td_ptr->tdesc1.TCR |= TCR0_VETAG; |
2617 | } | 2617 | } |
2618 | 2618 | ||
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 7df221788cd4..d0ed5694dd7d 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -645,7 +645,7 @@ static void macvtap_skb_to_vnet_hdr(struct macvtap_queue *q, | |||
645 | 645 | ||
646 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 646 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
647 | vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; | 647 | vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; |
648 | if (vlan_tx_tag_present(skb)) | 648 | if (skb_vlan_tag_present(skb)) |
649 | vnet_hdr->csum_start = cpu_to_macvtap16(q, | 649 | vnet_hdr->csum_start = cpu_to_macvtap16(q, |
650 | skb_checksum_start_offset(skb) + VLAN_HLEN); | 650 | skb_checksum_start_offset(skb) + VLAN_HLEN); |
651 | else | 651 | else |
@@ -821,13 +821,13 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q, | |||
821 | total = vnet_hdr_len; | 821 | total = vnet_hdr_len; |
822 | total += skb->len; | 822 | total += skb->len; |
823 | 823 | ||
824 | if (vlan_tx_tag_present(skb)) { | 824 | if (skb_vlan_tag_present(skb)) { |
825 | struct { | 825 | struct { |
826 | __be16 h_vlan_proto; | 826 | __be16 h_vlan_proto; |
827 | __be16 h_vlan_TCI; | 827 | __be16 h_vlan_TCI; |
828 | } veth; | 828 | } veth; |
829 | veth.h_vlan_proto = skb->vlan_proto; | 829 | veth.h_vlan_proto = skb->vlan_proto; |
830 | veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb)); | 830 | veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb)); |
831 | 831 | ||
832 | vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto); | 832 | vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto); |
833 | total += VLAN_HLEN; | 833 | total += VLAN_HLEN; |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 74fdf1158448..be196e89ab6c 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -1260,7 +1260,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, | |||
1260 | int vlan_hlen = 0; | 1260 | int vlan_hlen = 0; |
1261 | int vnet_hdr_sz = 0; | 1261 | int vnet_hdr_sz = 0; |
1262 | 1262 | ||
1263 | if (vlan_tx_tag_present(skb)) | 1263 | if (skb_vlan_tag_present(skb)) |
1264 | vlan_hlen = VLAN_HLEN; | 1264 | vlan_hlen = VLAN_HLEN; |
1265 | 1265 | ||
1266 | if (tun->flags & IFF_VNET_HDR) | 1266 | if (tun->flags & IFF_VNET_HDR) |
@@ -1337,7 +1337,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, | |||
1337 | } veth; | 1337 | } veth; |
1338 | 1338 | ||
1339 | veth.h_vlan_proto = skb->vlan_proto; | 1339 | veth.h_vlan_proto = skb->vlan_proto; |
1340 | veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb)); | 1340 | veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb)); |
1341 | 1341 | ||
1342 | vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto); | 1342 | vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto); |
1343 | 1343 | ||
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b23426e4952c..e519e6a269b9 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -1421,10 +1421,10 @@ static int msdn_giant_send_check(struct sk_buff *skb) | |||
1421 | 1421 | ||
1422 | static inline void rtl_tx_vlan_tag(struct tx_desc *desc, struct sk_buff *skb) | 1422 | static inline void rtl_tx_vlan_tag(struct tx_desc *desc, struct sk_buff *skb) |
1423 | { | 1423 | { |
1424 | if (vlan_tx_tag_present(skb)) { | 1424 | if (skb_vlan_tag_present(skb)) { |
1425 | u32 opts2; | 1425 | u32 opts2; |
1426 | 1426 | ||
1427 | opts2 = TX_VLAN_TAG | swab16(vlan_tx_tag_get(skb)); | 1427 | opts2 = TX_VLAN_TAG | swab16(skb_vlan_tag_get(skb)); |
1428 | desc->opts2 |= cpu_to_le32(opts2); | 1428 | desc->opts2 |= cpu_to_le32(opts2); |
1429 | } | 1429 | } |
1430 | } | 1430 | } |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 31439818c27e..294214c15292 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1038,9 +1038,9 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
1038 | le32_add_cpu(&tq->shared->txNumDeferred, 1); | 1038 | le32_add_cpu(&tq->shared->txNumDeferred, 1); |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | if (vlan_tx_tag_present(skb)) { | 1041 | if (skb_vlan_tag_present(skb)) { |
1042 | gdesc->txd.ti = 1; | 1042 | gdesc->txd.ti = 1; |
1043 | gdesc->txd.tci = vlan_tx_tag_get(skb); | 1043 | gdesc->txd.tci = skb_vlan_tag_get(skb); |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | /* finally flips the GEN bit of the SOP desc. */ | 1046 | /* finally flips the GEN bit of the SOP desc. */ |
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 3a18d8ed89ca..985359dd6033 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -1561,7 +1561,7 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs, | |||
1561 | 1561 | ||
1562 | min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len | 1562 | min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len |
1563 | + VXLAN_HLEN + sizeof(struct ipv6hdr) | 1563 | + VXLAN_HLEN + sizeof(struct ipv6hdr) |
1564 | + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 1564 | + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); |
1565 | 1565 | ||
1566 | /* Need space for new headers (invalidates iph ptr) */ | 1566 | /* Need space for new headers (invalidates iph ptr) */ |
1567 | err = skb_cow_head(skb, min_headroom); | 1567 | err = skb_cow_head(skb, min_headroom); |
@@ -1607,7 +1607,7 @@ int vxlan_xmit_skb(struct vxlan_sock *vs, | |||
1607 | 1607 | ||
1608 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len | 1608 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len |
1609 | + VXLAN_HLEN + sizeof(struct iphdr) | 1609 | + VXLAN_HLEN + sizeof(struct iphdr) |
1610 | + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 1610 | + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); |
1611 | 1611 | ||
1612 | /* Need space for new headers (invalidates iph ptr) */ | 1612 | /* Need space for new headers (invalidates iph ptr) */ |
1613 | err = skb_cow_head(skb, min_headroom); | 1613 | err = skb_cow_head(skb, min_headroom); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 625227ad16ee..dd4ab8d73d34 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2800,12 +2800,12 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
2800 | * before we're going to overwrite this location with next hop ip. | 2800 | * before we're going to overwrite this location with next hop ip. |
2801 | * v6 uses passthrough, v4 sets the tag in the QDIO header. | 2801 | * v6 uses passthrough, v4 sets the tag in the QDIO header. |
2802 | */ | 2802 | */ |
2803 | if (vlan_tx_tag_present(skb)) { | 2803 | if (skb_vlan_tag_present(skb)) { |
2804 | if ((ipv == 4) || (card->info.type == QETH_CARD_TYPE_IQD)) | 2804 | if ((ipv == 4) || (card->info.type == QETH_CARD_TYPE_IQD)) |
2805 | hdr->hdr.l3.ext_flags = QETH_HDR_EXT_VLAN_FRAME; | 2805 | hdr->hdr.l3.ext_flags = QETH_HDR_EXT_VLAN_FRAME; |
2806 | else | 2806 | else |
2807 | hdr->hdr.l3.ext_flags = QETH_HDR_EXT_INCLUDE_VLAN_TAG; | 2807 | hdr->hdr.l3.ext_flags = QETH_HDR_EXT_INCLUDE_VLAN_TAG; |
2808 | hdr->hdr.l3.vlan_id = vlan_tx_tag_get(skb); | 2808 | hdr->hdr.l3.vlan_id = skb_vlan_tag_get(skb); |
2809 | } | 2809 | } |
2810 | 2810 | ||
2811 | hdr->hdr.l3.length = skb->len - sizeof(struct qeth_hdr); | 2811 | 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) | |||
2986 | skb_pull(new_skb, ETH_HLEN); | 2986 | skb_pull(new_skb, ETH_HLEN); |
2987 | } | 2987 | } |
2988 | 2988 | ||
2989 | if (ipv != 4 && vlan_tx_tag_present(new_skb)) { | 2989 | if (ipv != 4 && skb_vlan_tag_present(new_skb)) { |
2990 | skb_push(new_skb, VLAN_HLEN); | 2990 | skb_push(new_skb, VLAN_HLEN); |
2991 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); | 2991 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); |
2992 | skb_copy_to_linear_data_offset(new_skb, 4, | 2992 | 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) | |||
2995 | new_skb->data + 12, 4); | 2995 | new_skb->data + 12, 4); |
2996 | tag = (u16 *)(new_skb->data + 12); | 2996 | tag = (u16 *)(new_skb->data + 12); |
2997 | *tag = __constant_htons(ETH_P_8021Q); | 2997 | *tag = __constant_htons(ETH_P_8021Q); |
2998 | *(tag + 1) = htons(vlan_tx_tag_get(new_skb)); | 2998 | *(tag + 1) = htons(skb_vlan_tag_get(new_skb)); |
2999 | } | 2999 | } |
3000 | } | 3000 | } |
3001 | 3001 | ||
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 14419a8ccbb6..bcaf4cabb858 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -469,7 +469,7 @@ static int peek_head_len(struct sock *sk) | |||
469 | head = skb_peek(&sk->sk_receive_queue); | 469 | head = skb_peek(&sk->sk_receive_queue); |
470 | if (likely(head)) { | 470 | if (likely(head)) { |
471 | len = head->len; | 471 | len = head->len; |
472 | if (vlan_tx_tag_present(head)) | 472 | if (skb_vlan_tag_present(head)) |
473 | len += VLAN_HLEN; | 473 | len += VLAN_HLEN; |
474 | } | 474 | } |
475 | 475 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 515a35e2a48a..bea465f24ebb 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -78,9 +78,9 @@ static inline bool is_vlan_dev(struct net_device *dev) | |||
78 | return dev->priv_flags & IFF_802_1Q_VLAN; | 78 | return dev->priv_flags & IFF_802_1Q_VLAN; |
79 | } | 79 | } |
80 | 80 | ||
81 | #define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) | 81 | #define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) |
82 | #define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) | 82 | #define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) |
83 | #define vlan_tx_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK) | 83 | #define skb_vlan_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK) |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * struct vlan_pcpu_stats - VLAN percpu rx/tx stats | 86 | * 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, | |||
376 | static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb) | 376 | static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb) |
377 | { | 377 | { |
378 | skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, | 378 | skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, |
379 | vlan_tx_tag_get(skb)); | 379 | skb_vlan_tag_get(skb)); |
380 | if (likely(skb)) | 380 | if (likely(skb)) |
381 | skb->vlan_tci = 0; | 381 | skb->vlan_tci = 0; |
382 | return skb; | 382 | return skb; |
@@ -393,7 +393,7 @@ static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb) | |||
393 | */ | 393 | */ |
394 | static inline struct sk_buff *vlan_hwaccel_push_inside(struct sk_buff *skb) | 394 | static inline struct sk_buff *vlan_hwaccel_push_inside(struct sk_buff *skb) |
395 | { | 395 | { |
396 | if (vlan_tx_tag_present(skb)) | 396 | if (skb_vlan_tag_present(skb)) |
397 | skb = __vlan_hwaccel_push_inside(skb); | 397 | skb = __vlan_hwaccel_push_inside(skb); |
398 | return skb; | 398 | return skb; |
399 | } | 399 | } |
@@ -442,8 +442,8 @@ static inline int __vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci) | |||
442 | static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb, | 442 | static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb, |
443 | u16 *vlan_tci) | 443 | u16 *vlan_tci) |
444 | { | 444 | { |
445 | if (vlan_tx_tag_present(skb)) { | 445 | if (skb_vlan_tag_present(skb)) { |
446 | *vlan_tci = vlan_tx_tag_get(skb); | 446 | *vlan_tci = skb_vlan_tag_get(skb); |
447 | return 0; | 447 | return 0; |
448 | } else { | 448 | } else { |
449 | *vlan_tci = 0; | 449 | *vlan_tci = 0; |
@@ -480,7 +480,7 @@ static inline __be16 vlan_get_protocol(const struct sk_buff *skb) | |||
480 | { | 480 | { |
481 | __be16 protocol = 0; | 481 | __be16 protocol = 0; |
482 | 482 | ||
483 | if (vlan_tx_tag_present(skb) || | 483 | if (skb_vlan_tag_present(skb) || |
484 | skb->protocol != cpu_to_be16(ETH_P_8021Q)) | 484 | skb->protocol != cpu_to_be16(ETH_P_8021Q)) |
485 | protocol = skb->protocol; | 485 | protocol = skb->protocol; |
486 | else { | 486 | else { |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index fe6e7aac3c56..2342bf12cb78 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -121,7 +121,7 @@ static inline __be16 tc_skb_protocol(const struct sk_buff *skb) | |||
121 | * vlan accelerated path. In that case, use skb->vlan_proto | 121 | * vlan accelerated path. In that case, use skb->vlan_proto |
122 | * as the original vlan header was already stripped. | 122 | * as the original vlan header was already stripped. |
123 | */ | 123 | */ |
124 | if (vlan_tx_tag_present(skb)) | 124 | if (skb_vlan_tag_present(skb)) |
125 | return skb->vlan_proto; | 125 | return skb->vlan_proto; |
126 | return skb->protocol; | 126 | return skb->protocol; |
127 | } | 127 | } |
diff --git a/include/trace/events/net.h b/include/trace/events/net.h index 1de256b35807..49cc7c3de252 100644 --- a/include/trace/events/net.h +++ b/include/trace/events/net.h | |||
@@ -40,9 +40,9 @@ TRACE_EVENT(net_dev_start_xmit, | |||
40 | __assign_str(name, dev->name); | 40 | __assign_str(name, dev->name); |
41 | __entry->queue_mapping = skb->queue_mapping; | 41 | __entry->queue_mapping = skb->queue_mapping; |
42 | __entry->skbaddr = skb; | 42 | __entry->skbaddr = skb; |
43 | __entry->vlan_tagged = vlan_tx_tag_present(skb); | 43 | __entry->vlan_tagged = skb_vlan_tag_present(skb); |
44 | __entry->vlan_proto = ntohs(skb->vlan_proto); | 44 | __entry->vlan_proto = ntohs(skb->vlan_proto); |
45 | __entry->vlan_tci = vlan_tx_tag_get(skb); | 45 | __entry->vlan_tci = skb_vlan_tag_get(skb); |
46 | __entry->protocol = ntohs(skb->protocol); | 46 | __entry->protocol = ntohs(skb->protocol); |
47 | __entry->ip_summed = skb->ip_summed; | 47 | __entry->ip_summed = skb->ip_summed; |
48 | __entry->len = skb->len; | 48 | __entry->len = skb->len; |
@@ -174,9 +174,9 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template, | |||
174 | #endif | 174 | #endif |
175 | __entry->queue_mapping = skb->queue_mapping; | 175 | __entry->queue_mapping = skb->queue_mapping; |
176 | __entry->skbaddr = skb; | 176 | __entry->skbaddr = skb; |
177 | __entry->vlan_tagged = vlan_tx_tag_present(skb); | 177 | __entry->vlan_tagged = skb_vlan_tag_present(skb); |
178 | __entry->vlan_proto = ntohs(skb->vlan_proto); | 178 | __entry->vlan_proto = ntohs(skb->vlan_proto); |
179 | __entry->vlan_tci = vlan_tx_tag_get(skb); | 179 | __entry->vlan_tci = skb_vlan_tag_get(skb); |
180 | __entry->protocol = ntohs(skb->protocol); | 180 | __entry->protocol = ntohs(skb->protocol); |
181 | __entry->ip_summed = skb->ip_summed; | 181 | __entry->ip_summed = skb->ip_summed; |
182 | __entry->hash = skb->hash; | 182 | __entry->hash = skb->hash; |
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 90cc2bdd4064..61bf2a06e85d 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -9,7 +9,7 @@ bool vlan_do_receive(struct sk_buff **skbp) | |||
9 | { | 9 | { |
10 | struct sk_buff *skb = *skbp; | 10 | struct sk_buff *skb = *skbp; |
11 | __be16 vlan_proto = skb->vlan_proto; | 11 | __be16 vlan_proto = skb->vlan_proto; |
12 | u16 vlan_id = vlan_tx_tag_get_id(skb); | 12 | u16 vlan_id = skb_vlan_tag_get_id(skb); |
13 | struct net_device *vlan_dev; | 13 | struct net_device *vlan_dev; |
14 | struct vlan_pcpu_stats *rx_stats; | 14 | struct vlan_pcpu_stats *rx_stats; |
15 | 15 | ||
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index c190d22b6b3d..65728e0dc4ff 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -66,17 +66,17 @@ static int brnf_pass_vlan_indev __read_mostly = 0; | |||
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #define IS_IP(skb) \ | 68 | #define IS_IP(skb) \ |
69 | (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) | 69 | (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) |
70 | 70 | ||
71 | #define IS_IPV6(skb) \ | 71 | #define IS_IPV6(skb) \ |
72 | (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) | 72 | (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) |
73 | 73 | ||
74 | #define IS_ARP(skb) \ | 74 | #define IS_ARP(skb) \ |
75 | (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) | 75 | (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) |
76 | 76 | ||
77 | static inline __be16 vlan_proto(const struct sk_buff *skb) | 77 | static inline __be16 vlan_proto(const struct sk_buff *skb) |
78 | { | 78 | { |
79 | if (vlan_tx_tag_present(skb)) | 79 | if (skb_vlan_tag_present(skb)) |
80 | return skb->protocol; | 80 | return skb->protocol; |
81 | else if (skb->protocol == htons(ETH_P_8021Q)) | 81 | else if (skb->protocol == htons(ETH_P_8021Q)) |
82 | return vlan_eth_hdr(skb)->h_vlan_encapsulated_proto; | 82 | 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 | |||
436 | struct net_device *vlan, *br; | 436 | struct net_device *vlan, *br; |
437 | 437 | ||
438 | br = bridge_parent(dev); | 438 | br = bridge_parent(dev); |
439 | if (brnf_pass_vlan_indev == 0 || !vlan_tx_tag_present(skb)) | 439 | if (brnf_pass_vlan_indev == 0 || !skb_vlan_tag_present(skb)) |
440 | return br; | 440 | return br; |
441 | 441 | ||
442 | vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto, | 442 | vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto, |
443 | vlan_tx_tag_get(skb) & VLAN_VID_MASK); | 443 | skb_vlan_tag_get(skb) & VLAN_VID_MASK); |
444 | 444 | ||
445 | return vlan ? vlan : br; | 445 | return vlan ? vlan : br; |
446 | } | 446 | } |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index aea3d1339b3f..d808d766334d 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -628,8 +628,8 @@ static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid) | |||
628 | { | 628 | { |
629 | int err = 0; | 629 | int err = 0; |
630 | 630 | ||
631 | if (vlan_tx_tag_present(skb)) | 631 | if (skb_vlan_tag_present(skb)) |
632 | *vid = vlan_tx_tag_get(skb) & VLAN_VID_MASK; | 632 | *vid = skb_vlan_tag_get(skb) & VLAN_VID_MASK; |
633 | else { | 633 | else { |
634 | *vid = 0; | 634 | *vid = 0; |
635 | err = -EINVAL; | 635 | err = -EINVAL; |
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 97b8ddf57363..13013fe8db24 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c | |||
@@ -187,7 +187,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v, | |||
187 | * sent from vlan device on the bridge device, it does not have | 187 | * sent from vlan device on the bridge device, it does not have |
188 | * HW accelerated vlan tag. | 188 | * HW accelerated vlan tag. |
189 | */ | 189 | */ |
190 | if (unlikely(!vlan_tx_tag_present(skb) && | 190 | if (unlikely(!skb_vlan_tag_present(skb) && |
191 | skb->protocol == proto)) { | 191 | skb->protocol == proto)) { |
192 | skb = skb_vlan_untag(skb); | 192 | skb = skb_vlan_untag(skb); |
193 | if (unlikely(!skb)) | 193 | if (unlikely(!skb)) |
@@ -200,7 +200,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v, | |||
200 | /* Protocol-mismatch, empty out vlan_tci for new tag */ | 200 | /* Protocol-mismatch, empty out vlan_tci for new tag */ |
201 | skb_push(skb, ETH_HLEN); | 201 | skb_push(skb, ETH_HLEN); |
202 | skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, | 202 | skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, |
203 | vlan_tx_tag_get(skb)); | 203 | skb_vlan_tag_get(skb)); |
204 | if (unlikely(!skb)) | 204 | if (unlikely(!skb)) |
205 | return false; | 205 | return false; |
206 | 206 | ||
diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c index 8d3f8c7651f0..618568888128 100644 --- a/net/bridge/netfilter/ebt_vlan.c +++ b/net/bridge/netfilter/ebt_vlan.c | |||
@@ -45,8 +45,8 @@ ebt_vlan_mt(const struct sk_buff *skb, struct xt_action_param *par) | |||
45 | /* VLAN encapsulated Type/Length field, given from orig frame */ | 45 | /* VLAN encapsulated Type/Length field, given from orig frame */ |
46 | __be16 encap; | 46 | __be16 encap; |
47 | 47 | ||
48 | if (vlan_tx_tag_present(skb)) { | 48 | if (skb_vlan_tag_present(skb)) { |
49 | TCI = vlan_tx_tag_get(skb); | 49 | TCI = skb_vlan_tag_get(skb); |
50 | encap = skb->protocol; | 50 | encap = skb->protocol; |
51 | } else { | 51 | } else { |
52 | const struct vlan_hdr *fp; | 52 | const struct vlan_hdr *fp; |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index d9a8c05d995d..91180a7fc943 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -133,7 +133,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb, | |||
133 | __be16 ethproto; | 133 | __be16 ethproto; |
134 | int verdict, i; | 134 | int verdict, i; |
135 | 135 | ||
136 | if (vlan_tx_tag_present(skb)) | 136 | if (skb_vlan_tag_present(skb)) |
137 | ethproto = htons(ETH_P_8021Q); | 137 | ethproto = htons(ETH_P_8021Q); |
138 | else | 138 | else |
139 | ethproto = h->h_proto; | 139 | ethproto = h->h_proto; |
diff --git a/net/core/dev.c b/net/core/dev.c index 805456147c30..1e325adc4367 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2578,7 +2578,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb) | |||
2578 | if (skb->encapsulation) | 2578 | if (skb->encapsulation) |
2579 | features &= dev->hw_enc_features; | 2579 | features &= dev->hw_enc_features; |
2580 | 2580 | ||
2581 | if (!vlan_tx_tag_present(skb)) { | 2581 | if (!skb_vlan_tag_present(skb)) { |
2582 | if (unlikely(protocol == htons(ETH_P_8021Q) || | 2582 | if (unlikely(protocol == htons(ETH_P_8021Q) || |
2583 | protocol == htons(ETH_P_8021AD))) { | 2583 | protocol == htons(ETH_P_8021AD))) { |
2584 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; | 2584 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; |
@@ -2659,7 +2659,7 @@ out: | |||
2659 | static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb, | 2659 | static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb, |
2660 | netdev_features_t features) | 2660 | netdev_features_t features) |
2661 | { | 2661 | { |
2662 | if (vlan_tx_tag_present(skb) && | 2662 | if (skb_vlan_tag_present(skb) && |
2663 | !vlan_hw_offload_capable(features, skb->vlan_proto)) | 2663 | !vlan_hw_offload_capable(features, skb->vlan_proto)) |
2664 | skb = __vlan_hwaccel_push_inside(skb); | 2664 | skb = __vlan_hwaccel_push_inside(skb); |
2665 | return skb; | 2665 | return skb; |
@@ -3676,7 +3676,7 @@ ncls: | |||
3676 | if (pfmemalloc && !skb_pfmemalloc_protocol(skb)) | 3676 | if (pfmemalloc && !skb_pfmemalloc_protocol(skb)) |
3677 | goto drop; | 3677 | goto drop; |
3678 | 3678 | ||
3679 | if (vlan_tx_tag_present(skb)) { | 3679 | if (skb_vlan_tag_present(skb)) { |
3680 | if (pt_prev) { | 3680 | if (pt_prev) { |
3681 | ret = deliver_skb(skb, pt_prev, orig_dev); | 3681 | ret = deliver_skb(skb, pt_prev, orig_dev); |
3682 | pt_prev = NULL; | 3682 | pt_prev = NULL; |
@@ -3708,8 +3708,8 @@ ncls: | |||
3708 | } | 3708 | } |
3709 | } | 3709 | } |
3710 | 3710 | ||
3711 | if (unlikely(vlan_tx_tag_present(skb))) { | 3711 | if (unlikely(skb_vlan_tag_present(skb))) { |
3712 | if (vlan_tx_tag_get_id(skb)) | 3712 | if (skb_vlan_tag_get_id(skb)) |
3713 | skb->pkt_type = PACKET_OTHERHOST; | 3713 | skb->pkt_type = PACKET_OTHERHOST; |
3714 | /* Note: we might in the future use prio bits | 3714 | /* Note: we might in the future use prio bits |
3715 | * and set skb->priority like in vlan_do_receive() | 3715 | * and set skb->priority like in vlan_do_receive() |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index e0ad5d16c9c5..c126a878c47c 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -77,7 +77,7 @@ static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
77 | 77 | ||
78 | features = netif_skb_features(skb); | 78 | features = netif_skb_features(skb); |
79 | 79 | ||
80 | if (vlan_tx_tag_present(skb) && | 80 | if (skb_vlan_tag_present(skb) && |
81 | !vlan_hw_offload_capable(features, skb->vlan_proto)) { | 81 | !vlan_hw_offload_capable(features, skb->vlan_proto)) { |
82 | skb = __vlan_hwaccel_push_inside(skb); | 82 | skb = __vlan_hwaccel_push_inside(skb); |
83 | if (unlikely(!skb)) { | 83 | if (unlikely(!skb)) { |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5a2a2e887a12..56db472e9b86 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -4197,7 +4197,7 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb) | |||
4197 | struct vlan_hdr *vhdr; | 4197 | struct vlan_hdr *vhdr; |
4198 | u16 vlan_tci; | 4198 | u16 vlan_tci; |
4199 | 4199 | ||
4200 | if (unlikely(vlan_tx_tag_present(skb))) { | 4200 | if (unlikely(skb_vlan_tag_present(skb))) { |
4201 | /* vlan_tci is already set-up so leave this for another time */ | 4201 | /* vlan_tci is already set-up so leave this for another time */ |
4202 | return skb; | 4202 | return skb; |
4203 | } | 4203 | } |
@@ -4283,7 +4283,7 @@ int skb_vlan_pop(struct sk_buff *skb) | |||
4283 | __be16 vlan_proto; | 4283 | __be16 vlan_proto; |
4284 | int err; | 4284 | int err; |
4285 | 4285 | ||
4286 | if (likely(vlan_tx_tag_present(skb))) { | 4286 | if (likely(skb_vlan_tag_present(skb))) { |
4287 | skb->vlan_tci = 0; | 4287 | skb->vlan_tci = 0; |
4288 | } else { | 4288 | } else { |
4289 | if (unlikely((skb->protocol != htons(ETH_P_8021Q) && | 4289 | if (unlikely((skb->protocol != htons(ETH_P_8021Q) && |
@@ -4313,7 +4313,7 @@ EXPORT_SYMBOL(skb_vlan_pop); | |||
4313 | 4313 | ||
4314 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) | 4314 | int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) |
4315 | { | 4315 | { |
4316 | if (vlan_tx_tag_present(skb)) { | 4316 | if (skb_vlan_tag_present(skb)) { |
4317 | unsigned int offset = skb->data - skb_mac_header(skb); | 4317 | unsigned int offset = skb->data - skb_mac_header(skb); |
4318 | int err; | 4318 | int err; |
4319 | 4319 | ||
@@ -4323,7 +4323,7 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) | |||
4323 | */ | 4323 | */ |
4324 | __skb_push(skb, offset); | 4324 | __skb_push(skb, offset); |
4325 | err = __vlan_insert_tag(skb, skb->vlan_proto, | 4325 | err = __vlan_insert_tag(skb, skb->vlan_proto, |
4326 | vlan_tx_tag_get(skb)); | 4326 | skb_vlan_tag_get(skb)); |
4327 | if (err) | 4327 | if (err) |
4328 | return err; | 4328 | return err; |
4329 | skb->protocol = skb->vlan_proto; | 4329 | skb->protocol = skb->vlan_proto; |
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c index 5b52046ec7a2..23744c7a9718 100644 --- a/net/ipv4/geneve.c +++ b/net/ipv4/geneve.c | |||
@@ -119,7 +119,7 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt, | |||
119 | 119 | ||
120 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len | 120 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len |
121 | + GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr) | 121 | + GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr) |
122 | + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 122 | + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); |
123 | 123 | ||
124 | err = skb_cow_head(skb, min_headroom); | 124 | err = skb_cow_head(skb, min_headroom); |
125 | if (unlikely(err)) { | 125 | if (unlikely(err)) { |
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 770064c83711..b4cffe686126 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c | |||
@@ -212,7 +212,7 @@ static int pop_vlan(struct sk_buff *skb, struct sw_flow_key *key) | |||
212 | int err; | 212 | int err; |
213 | 213 | ||
214 | err = skb_vlan_pop(skb); | 214 | err = skb_vlan_pop(skb); |
215 | if (vlan_tx_tag_present(skb)) | 215 | if (skb_vlan_tag_present(skb)) |
216 | invalidate_flow_key(key); | 216 | invalidate_flow_key(key); |
217 | else | 217 | else |
218 | key->eth.tci = 0; | 218 | key->eth.tci = 0; |
@@ -222,7 +222,7 @@ static int pop_vlan(struct sk_buff *skb, struct sw_flow_key *key) | |||
222 | static int push_vlan(struct sk_buff *skb, struct sw_flow_key *key, | 222 | static int push_vlan(struct sk_buff *skb, struct sw_flow_key *key, |
223 | const struct ovs_action_push_vlan *vlan) | 223 | const struct ovs_action_push_vlan *vlan) |
224 | { | 224 | { |
225 | if (vlan_tx_tag_present(skb)) | 225 | if (skb_vlan_tag_present(skb)) |
226 | invalidate_flow_key(key); | 226 | invalidate_flow_key(key); |
227 | else | 227 | else |
228 | key->eth.tci = vlan->vlan_tci; | 228 | key->eth.tci = vlan->vlan_tci; |
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 4e9a5f035cbc..54854e3ecd83 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -419,7 +419,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, | |||
419 | if (!dp_ifindex) | 419 | if (!dp_ifindex) |
420 | return -ENODEV; | 420 | return -ENODEV; |
421 | 421 | ||
422 | if (vlan_tx_tag_present(skb)) { | 422 | if (skb_vlan_tag_present(skb)) { |
423 | nskb = skb_clone(skb, GFP_ATOMIC); | 423 | nskb = skb_clone(skb, GFP_ATOMIC); |
424 | if (!nskb) | 424 | if (!nskb) |
425 | return -ENOMEM; | 425 | return -ENOMEM; |
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index da2fae0873a5..df334fe43d7f 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c | |||
@@ -70,7 +70,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, | |||
70 | { | 70 | { |
71 | struct flow_stats *stats; | 71 | struct flow_stats *stats; |
72 | int node = numa_node_id(); | 72 | int node = numa_node_id(); |
73 | int len = skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 73 | int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); |
74 | 74 | ||
75 | stats = rcu_dereference(flow->stats[node]); | 75 | stats = rcu_dereference(flow->stats[node]); |
76 | 76 | ||
@@ -472,7 +472,7 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key) | |||
472 | */ | 472 | */ |
473 | 473 | ||
474 | key->eth.tci = 0; | 474 | key->eth.tci = 0; |
475 | if (vlan_tx_tag_present(skb)) | 475 | if (skb_vlan_tag_present(skb)) |
476 | key->eth.tci = htons(skb->vlan_tci); | 476 | key->eth.tci = htons(skb->vlan_tci); |
477 | else if (eth->h_proto == htons(ETH_P_8021Q)) | 477 | else if (eth->h_proto == htons(ETH_P_8021Q)) |
478 | if (unlikely(parse_vlan(skb, key))) | 478 | if (unlikely(parse_vlan(skb, key))) |
diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c index d4168c442db5..e9aedb7c7106 100644 --- a/net/openvswitch/vport-gre.c +++ b/net/openvswitch/vport-gre.c | |||
@@ -166,7 +166,7 @@ static int gre_tnl_send(struct vport *vport, struct sk_buff *skb) | |||
166 | 166 | ||
167 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len | 167 | min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len |
168 | + tunnel_hlen + sizeof(struct iphdr) | 168 | + tunnel_hlen + sizeof(struct iphdr) |
169 | + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 169 | + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); |
170 | if (skb_headroom(skb) < min_headroom || skb_header_cloned(skb)) { | 170 | if (skb_headroom(skb) < min_headroom || skb_header_cloned(skb)) { |
171 | int head_delta = SKB_DATA_ALIGN(min_headroom - | 171 | int head_delta = SKB_DATA_ALIGN(min_headroom - |
172 | skb_headroom(skb) + | 172 | skb_headroom(skb) + |
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 2034c6d9cb5a..464739aac0f3 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c | |||
@@ -480,7 +480,8 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, | |||
480 | stats = this_cpu_ptr(vport->percpu_stats); | 480 | stats = this_cpu_ptr(vport->percpu_stats); |
481 | u64_stats_update_begin(&stats->syncp); | 481 | u64_stats_update_begin(&stats->syncp); |
482 | stats->rx_packets++; | 482 | stats->rx_packets++; |
483 | stats->rx_bytes += skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); | 483 | stats->rx_bytes += skb->len + |
484 | (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); | ||
484 | u64_stats_update_end(&stats->syncp); | 485 | u64_stats_update_end(&stats->syncp); |
485 | 486 | ||
486 | OVS_CB(skb)->input_vport = vport; | 487 | OVS_CB(skb)->input_vport = vport; |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 0f02668dc219..d37075b0d6d5 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -986,8 +986,8 @@ static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, | |||
986 | static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, | 986 | static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, |
987 | struct tpacket3_hdr *ppd) | 987 | struct tpacket3_hdr *ppd) |
988 | { | 988 | { |
989 | if (vlan_tx_tag_present(pkc->skb)) { | 989 | if (skb_vlan_tag_present(pkc->skb)) { |
990 | ppd->hv1.tp_vlan_tci = vlan_tx_tag_get(pkc->skb); | 990 | ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb); |
991 | ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); | 991 | ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); |
992 | ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; | 992 | ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; |
993 | } else { | 993 | } else { |
@@ -2000,8 +2000,8 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, | |||
2000 | h.h2->tp_net = netoff; | 2000 | h.h2->tp_net = netoff; |
2001 | h.h2->tp_sec = ts.tv_sec; | 2001 | h.h2->tp_sec = ts.tv_sec; |
2002 | h.h2->tp_nsec = ts.tv_nsec; | 2002 | h.h2->tp_nsec = ts.tv_nsec; |
2003 | if (vlan_tx_tag_present(skb)) { | 2003 | if (skb_vlan_tag_present(skb)) { |
2004 | h.h2->tp_vlan_tci = vlan_tx_tag_get(skb); | 2004 | h.h2->tp_vlan_tci = skb_vlan_tag_get(skb); |
2005 | h.h2->tp_vlan_tpid = ntohs(skb->vlan_proto); | 2005 | h.h2->tp_vlan_tpid = ntohs(skb->vlan_proto); |
2006 | status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; | 2006 | status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; |
2007 | } else { | 2007 | } else { |
@@ -3010,8 +3010,8 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
3010 | aux.tp_snaplen = skb->len; | 3010 | aux.tp_snaplen = skb->len; |
3011 | aux.tp_mac = 0; | 3011 | aux.tp_mac = 0; |
3012 | aux.tp_net = skb_network_offset(skb); | 3012 | aux.tp_net = skb_network_offset(skb); |
3013 | if (vlan_tx_tag_present(skb)) { | 3013 | if (skb_vlan_tag_present(skb)) { |
3014 | aux.tp_vlan_tci = vlan_tx_tag_get(skb); | 3014 | aux.tp_vlan_tci = skb_vlan_tag_get(skb); |
3015 | aux.tp_vlan_tpid = ntohs(skb->vlan_proto); | 3015 | aux.tp_vlan_tpid = ntohs(skb->vlan_proto); |
3016 | aux.tp_status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; | 3016 | aux.tp_status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; |
3017 | } else { | 3017 | } else { |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 2159981b604e..b5294ce20cd4 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -176,7 +176,7 @@ META_COLLECTOR(int_vlan_tag) | |||
176 | { | 176 | { |
177 | unsigned short tag; | 177 | unsigned short tag; |
178 | 178 | ||
179 | tag = vlan_tx_tag_get(skb); | 179 | tag = skb_vlan_tag_get(skb); |
180 | if (!tag && __vlan_get_tag(skb, &tag)) | 180 | if (!tag && __vlan_get_tag(skb, &tag)) |
181 | *err = -1; | 181 | *err = -1; |
182 | else | 182 | else |
diff --git a/net/wireless/util.c b/net/wireless/util.c index d0ac795445b7..1d2fcfad06cc 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -708,8 +708,8 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb, | |||
708 | if (skb->priority >= 256 && skb->priority <= 263) | 708 | if (skb->priority >= 256 && skb->priority <= 263) |
709 | return skb->priority - 256; | 709 | return skb->priority - 256; |
710 | 710 | ||
711 | if (vlan_tx_tag_present(skb)) { | 711 | if (skb_vlan_tag_present(skb)) { |
712 | vlan_priority = (vlan_tx_tag_get(skb) & VLAN_PRIO_MASK) | 712 | vlan_priority = (skb_vlan_tag_get(skb) & VLAN_PRIO_MASK) |
713 | >> VLAN_PRIO_SHIFT; | 713 | >> VLAN_PRIO_SHIFT; |
714 | if (vlan_priority > 0) | 714 | if (vlan_priority > 0) |
715 | return vlan_priority; | 715 | return vlan_priority; |