diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 08:54:22 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-22 00:47:55 +0400 |
commit | f1b553fbe73bfad38f41269d1c7a7ce3176d9539 (patch) | |
tree | 827da7588b9a8e9780f24787c2861f0e332319d3 /drivers/net/mlx4/en_rx.c | |
parent | 5043f5057773ba8b539eb51b9a4007e99599824f (diff) | |
download | linux-f1b553fbe73bfad38f41269d1c7a7ce3176d9539.tar.xz |
mlx4: do vlan cleanup
- unify vlan and nonvlan path
- kill priv->vlgrp and mlx4_en_vlan_rx_register
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/mlx4/en_rx.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 5197b50b2d81..37cc9e5c56be 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c @@ -611,11 +611,14 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud gro_skb->truesize += length; gro_skb->ip_summed = CHECKSUM_UNNECESSARY; - if (priv->vlgrp && (cqe->vlan_my_qpn & - cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK))) - vlan_gro_frags(&cq->napi, priv->vlgrp, be16_to_cpu(cqe->sl_vid)); - else - napi_gro_frags(&cq->napi); + if (cqe->vlan_my_qpn & + cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)) { + u16 vid = be16_to_cpu(cqe->sl_vid); + + __vlan_hwaccel_put_tag(gro_skb, vid); + } + + napi_gro_frags(&cq->napi); goto next; } @@ -647,13 +650,12 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud skb->protocol = eth_type_trans(skb, dev); skb_record_rx_queue(skb, cq->ring); + if (be32_to_cpu(cqe->vlan_my_qpn) & + MLX4_CQE_VLAN_PRESENT_MASK) + __vlan_hwaccel_put_tag(skb, be16_to_cpu(cqe->sl_vid)); + /* Push it up the stack */ - if (priv->vlgrp && (be32_to_cpu(cqe->vlan_my_qpn) & - MLX4_CQE_VLAN_PRESENT_MASK)) { - vlan_hwaccel_receive_skb(skb, priv->vlgrp, - be16_to_cpu(cqe->sl_vid)); - } else - netif_receive_skb(skb); + netif_receive_skb(skb); next: ++cq->mcq.cons_index; |