diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-18 22:04:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 14:46:06 -0400 |
commit | 86a9bad3ab6b6f858fd4443b48738cabbb6d094c (patch) | |
tree | 21d41b1c81e0f3e53ac4004627a8c9588099fea1 /drivers/net/ethernet/chelsio/cxgb4vf/sge.c | |
parent | 1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/sge.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c index 61dfb2a47929..df296af20bd5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c | |||
@@ -1482,7 +1482,8 @@ static void do_gro(struct sge_eth_rxq *rxq, const struct pkt_gl *gl, | |||
1482 | skb_record_rx_queue(skb, rxq->rspq.idx); | 1482 | skb_record_rx_queue(skb, rxq->rspq.idx); |
1483 | 1483 | ||
1484 | if (pkt->vlan_ex) { | 1484 | if (pkt->vlan_ex) { |
1485 | __vlan_hwaccel_put_tag(skb, be16_to_cpu(pkt->vlan)); | 1485 | __vlan_hwaccel_put_tag(skb, cpu_to_be16(ETH_P_8021Q), |
1486 | be16_to_cpu(pkt->vlan)); | ||
1486 | rxq->stats.vlan_ex++; | 1487 | rxq->stats.vlan_ex++; |
1487 | } | 1488 | } |
1488 | ret = napi_gro_frags(&rxq->rspq.napi); | 1489 | ret = napi_gro_frags(&rxq->rspq.napi); |
@@ -1551,7 +1552,7 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp, | |||
1551 | 1552 | ||
1552 | if (pkt->vlan_ex) { | 1553 | if (pkt->vlan_ex) { |
1553 | rxq->stats.vlan_ex++; | 1554 | rxq->stats.vlan_ex++; |
1554 | __vlan_hwaccel_put_tag(skb, be16_to_cpu(pkt->vlan)); | 1555 | __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), be16_to_cpu(pkt->vlan)); |
1555 | } | 1556 | } |
1556 | 1557 | ||
1557 | netif_receive_skb(skb); | 1558 | netif_receive_skb(skb); |