Skip to content

Commit df8a39d

Browse files
jpirkodavem330
authored andcommitted
net: rename vlan_tx_* helpers since "tx" is misleading there
The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d8b9605 commit df8a39d

77 files changed

Lines changed: 195 additions & 190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/networking/filter.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ Possible BPF extensions are shown in the following table:
279279
hatype skb->dev->type
280280
rxhash skb->hash
281281
cpu raw_smp_processor_id()
282-
vlan_tci vlan_tx_tag_get(skb)
283-
vlan_pr vlan_tx_tag_present(skb)
282+
vlan_tci skb_vlan_tag_get(skb)
283+
vlan_pr skb_vlan_tag_present(skb)
284284
rand prandom_u32()
285285

286286
These extensions can also be prefixed with '#'.

‎drivers/infiniband/hw/nes/nes_nic.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,11 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
373373
wqe_fragment_length = (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
374374

375375
/* setup the VLAN tag if present */
376-
if (vlan_tx_tag_present(skb)) {
376+
if (skb_vlan_tag_present(skb)) {
377377
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));
379379
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);
381381
} else
382382
wqe_misc = 0;
383383

@@ -576,11 +576,12 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
576576
wqe_fragment_length =
577577
(__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
578578
/* setup the VLAN tag if present */
579-
if (vlan_tx_tag_present(skb)) {
579+
if (skb_vlan_tag_present(skb)) {
580580
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));
582583
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);
584585
} else
585586
wqe_misc = 0;
586587

‎drivers/net/ethernet/3com/typhoon.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,11 +769,11 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
769769
first_txd->processFlags |= TYPHOON_TX_PF_IP_CHKSUM;
770770
}
771771

772-
if(vlan_tx_tag_present(skb)) {
772+
if (skb_vlan_tag_present(skb)) {
773773
first_txd->processFlags |=
774774
TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY;
775775
first_txd->processFlags |=
776-
cpu_to_le32(htons(vlan_tx_tag_get(skb)) <<
776+
cpu_to_le32(htons(skb_vlan_tag_get(skb)) <<
777777
TYPHOON_TX_PF_VLAN_TAG_SHIFT);
778778
}
779779

‎drivers/net/ethernet/alteon/acenic.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,9 +2429,9 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
24292429
flagsize = (skb->len << 16) | (BD_FLG_END);
24302430
if (skb->ip_summed == CHECKSUM_PARTIAL)
24312431
flagsize |= BD_FLG_TCP_UDP_SUM;
2432-
if (vlan_tx_tag_present(skb)) {
2432+
if (skb_vlan_tag_present(skb)) {
24332433
flagsize |= BD_FLG_VLAN_TAG;
2434-
vlan_tag = vlan_tx_tag_get(skb);
2434+
vlan_tag = skb_vlan_tag_get(skb);
24352435
}
24362436
desc = ap->tx_ring + idx;
24372437
idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap);
@@ -2450,9 +2450,9 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
24502450
flagsize = (skb_headlen(skb) << 16);
24512451
if (skb->ip_summed == CHECKSUM_PARTIAL)
24522452
flagsize |= BD_FLG_TCP_UDP_SUM;
2453-
if (vlan_tx_tag_present(skb)) {
2453+
if (skb_vlan_tag_present(skb)) {
24542454
flagsize |= BD_FLG_VLAN_TAG;
2455-
vlan_tag = vlan_tx_tag_get(skb);
2455+
vlan_tag = skb_vlan_tag_get(skb);
24562456
}
24572457

24582458
ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag);

‎drivers/net/ethernet/amd/amd8111e.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,11 +1299,11 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
12991299
lp->tx_ring[tx_index].tx_flags = 0;
13001300

13011301
#if AMD8111E_VLAN_TAG_USED
1302-
if (vlan_tx_tag_present(skb)) {
1302+
if (skb_vlan_tag_present(skb)) {
13031303
lp->tx_ring[tx_index].tag_ctrl_cmd |=
13041304
cpu_to_le16(TCC_VLAN_INSERT);
13051305
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));
13071307

13081308
}
13091309
#endif

‎drivers/net/ethernet/amd/xgbe/xgbe-drv.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,8 +1165,8 @@ static void xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata,
11651165

11661166
static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet)
11671167
{
1168-
if (vlan_tx_tag_present(skb))
1169-
packet->vlan_ctag = vlan_tx_tag_get(skb);
1168+
if (skb_vlan_tag_present(skb))
1169+
packet->vlan_ctag = skb_vlan_tag_get(skb);
11701170
}
11711171

11721172
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,
12471247
XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES,
12481248
CSUM_ENABLE, 1);
12491249

1250-
if (vlan_tx_tag_present(skb)) {
1250+
if (skb_vlan_tag_present(skb)) {
12511251
/* 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)
12531253
/* We can share with the TSO context descriptor */
12541254
if (!context_desc) {
12551255
context_desc = 1;

‎drivers/net/ethernet/atheros/atl1c/atl1c_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,8 +2235,8 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
22352235
return NETDEV_TX_OK;
22362236
}
22372237

2238-
if (unlikely(vlan_tx_tag_present(skb))) {
2239-
u16 vlan = vlan_tx_tag_get(skb);
2238+
if (unlikely(skb_vlan_tag_present(skb))) {
2239+
u16 vlan = skb_vlan_tag_get(skb);
22402240
__le16 tag;
22412241

22422242
vlan = cpu_to_le16(vlan);

‎drivers/net/ethernet/atheros/atl1e/atl1e_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,8 +1892,8 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
18921892

18931893
tpd = atl1e_get_tpd(adapter);
18941894

1895-
if (vlan_tx_tag_present(skb)) {
1896-
u16 vlan_tag = vlan_tx_tag_get(skb);
1895+
if (skb_vlan_tag_present(skb)) {
1896+
u16 vlan_tag = skb_vlan_tag_get(skb);
18971897
u16 atl1e_vlan_tag;
18981898

18991899
tpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;

‎drivers/net/ethernet/atheros/atlx/atl1.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,8 +2415,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
24152415
(u16) atomic_read(&tpd_ring->next_to_use));
24162416
memset(ptpd, 0, sizeof(struct tx_packet_desc));
24172417

2418-
if (vlan_tx_tag_present(skb)) {
2419-
vlan_tag = vlan_tx_tag_get(skb);
2418+
if (skb_vlan_tag_present(skb)) {
2419+
vlan_tag = skb_vlan_tag_get(skb);
24202420
vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
24212421
((vlan_tag >> 9) & 0x8);
24222422
ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;

‎drivers/net/ethernet/atheros/atlx/atl2.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,8 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
887887
offset = ((u32)(skb->len-copy_len + 3) & ~3);
888888
}
889889
#ifdef NETIF_F_HW_VLAN_CTAG_TX
890-
if (vlan_tx_tag_present(skb)) {
891-
u16 vlan_tag = vlan_tx_tag_get(skb);
890+
if (skb_vlan_tag_present(skb)) {
891+
u16 vlan_tag = skb_vlan_tag_get(skb);
892892
vlan_tag = (vlan_tag << 4) |
893893
(vlan_tag >> 13) |
894894
((vlan_tag >> 9) & 0x8);

0 commit comments

Comments
 (0)