Skip to content

Commit 86a9bad

Browse files
kaberdavem330
authored andcommitted
net: vlan: add protocol argument to packet tagging functions
Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1fd9b1f commit 86a9bad

File tree

56 files changed

+107
-84
lines changed

Some content is hidden

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

56 files changed

+107
-84
lines changed

drivers/infiniband/hw/nes/nes_hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,7 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
29482948
nes_debug(NES_DBG_CQ, "%s: Reporting stripped VLAN packet. Tag = 0x%04X\n",
29492949
nesvnic->netdev->name, vlan_tag);
29502950

2951-
__vlan_hwaccel_put_tag(rx_skb, vlan_tag);
2951+
__vlan_hwaccel_put_tag(rx_skb, htons(ETH_P_8021Q), vlan_tag);
29522952
}
29532953
if (nes_use_lro)
29542954
lro_receive_skb(&nesvnic->lro_mgr, rx_skb, NULL);

drivers/net/bonding/bond_alb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
514514
skb->dev = client_info->slave->dev;
515515

516516
if (client_info->tag) {
517-
skb = vlan_put_tag(skb, client_info->vlan_id);
517+
skb = vlan_put_tag(skb, htons(ETH_P_8021Q), client_info->vlan_id);
518518
if (!skb) {
519519
pr_err("%s: Error: failed to insert VLAN tag\n",
520520
client_info->slave->bond->dev->name);
@@ -1014,7 +1014,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
10141014
continue;
10151015
}
10161016

1017-
skb = vlan_put_tag(skb, vlan->vlan_id);
1017+
skb = vlan_put_tag(skb, htons(ETH_P_8021Q), vlan->vlan_id);
10181018
if (!skb) {
10191019
pr_err("%s: Error: failed to insert VLAN tag\n",
10201020
bond->dev->name);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * read
16901690
skb_checksum_none_assert(new_skb);
16911691

16921692
if (rx->rxStatus & TYPHOON_RX_VLAN)
1693-
__vlan_hwaccel_put_tag(new_skb,
1693+
__vlan_hwaccel_put_tag(new_skb, htons(ETH_P_8021Q),
16941694
ntohl(rx->vlanTag) & 0xffff);
16951695
netif_receive_skb(new_skb);
16961696

drivers/net/ethernet/adaptec/starfire.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
14981498
printk(KERN_DEBUG " netdev_rx() vlanid = %d\n",
14991499
vlid);
15001500
}
1501-
__vlan_hwaccel_put_tag(skb, vlid);
1501+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlid);
15021502
}
15031503
#endif /* VLAN_SUPPORT */
15041504
netif_receive_skb(skb);

drivers/net/ethernet/alteon/acenic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
20192019

20202020
/* send it up */
20212021
if ((bd_flags & BD_FLG_VLAN_TAG))
2022-
__vlan_hwaccel_put_tag(skb, retdesc->vlan);
2022+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), retdesc->vlan);
20232023
netif_rx(skb);
20242024

20252025
dev->stats.rx_packets++;

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
793793
#if AMD8111E_VLAN_TAG_USED
794794
if (vtag == TT_VLAN_TAGGED){
795795
u16 vlan_tag = le16_to_cpu(lp->rx_ring[rx_index].tag_ctrl_info);
796-
__vlan_hwaccel_put_tag(skb, vlan_tag);
796+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
797797
}
798798
#endif
799799
netif_receive_skb(skb);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter,
18091809

18101810
AT_TAG_TO_VLAN(rrs->vlan_tag, vlan);
18111811
vlan = le16_to_cpu(vlan);
1812-
__vlan_hwaccel_put_tag(skb, vlan);
1812+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
18131813
}
18141814
netif_receive_skb(skb);
18151815

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
14351435
netdev_dbg(netdev,
14361436
"RXD VLAN TAG<RRD>=0x%04x\n",
14371437
prrs->vtag);
1438-
__vlan_hwaccel_put_tag(skb, vlan_tag);
1438+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
14391439
}
14401440
netif_receive_skb(skb);
14411441

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ static int atl1_intr_rx(struct atl1_adapter *adapter, int budget)
20242024
((rrd->vlan_tag & 7) << 13) |
20252025
((rrd->vlan_tag & 8) << 9);
20262026

2027-
__vlan_hwaccel_put_tag(skb, vlan_tag);
2027+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
20282028
}
20292029
netif_receive_skb(skb);
20302030

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
452452
((rxd->status.vtag&7) << 13) |
453453
((rxd->status.vtag&8) << 9);
454454

455-
__vlan_hwaccel_put_tag(skb, vlan_tag);
455+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
456456
}
457457
netif_rx(skb);
458458
netdev->stats.rx_bytes += rx_size;

0 commit comments

Comments
 (0)