net/mlx4: Prepare VLAN macros for 802.1ad Hardware accelerated support
authorHadar Hen Zion <hadarh@mellanox.com>
Mon, 27 Jul 2015 11:46:33 +0000 (14:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 22:00:37 +0000 (15:00 -0700)
To add Hardware accelerated support in 802.1ad vlan, replace
Current VLAN macros to CVLAN.
Replace:
MLX4_WQE_CTRL_INS_VLAN
MLX4_CQE_VLAN_PRESENT_MASK
With:
MLX4_WQE_CTRL_INS_CVLAN
MLX4_CQE_CVLAN_PRESENT_MASK

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx4/cq.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
include/linux/mlx4/cq.h
include/linux/mlx4/qp.h

index 36eb3d012b6d34ac96823cb193001afb42ae95ce..180a8f7ec82de80fdf69f4226d9bb0d8fff54052 100644 (file)
@@ -871,7 +871,7 @@ repoll:
                if (is_eth) {
                        wc->sl  = be16_to_cpu(cqe->sl_vid) >> 13;
                        if (be32_to_cpu(cqe->vlan_my_qpn) &
-                                       MLX4_CQE_VLAN_PRESENT_MASK) {
+                                       MLX4_CQE_CVLAN_PRESENT_MASK) {
                                wc->vlan_id = be16_to_cpu(cqe->sl_vid) &
                                        MLX4_CQE_VID_MASK;
                        } else {
index 12c65e1ad6a93c54d94c8add0adbc9685f9ef417..10f6c2f1d5a07f10b645c948a4dd46014148b3d3 100644 (file)
@@ -726,7 +726,7 @@ static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va,
 
        hw_checksum = csum_unfold((__force __sum16)cqe->checksum);
 
-       if (cqe->vlan_my_qpn & cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK) &&
+       if (cqe->vlan_my_qpn & cpu_to_be32(MLX4_CQE_CVLAN_PRESENT_MASK) &&
            !(dev_features & NETIF_F_HW_VLAN_CTAG_RX)) {
                hw_checksum = get_fixed_vlan_csum(hw_checksum, hdr);
                hdr += sizeof(struct vlan_hdr);
@@ -907,7 +907,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
                                gro_skb->csum_level = 1;
 
                        if ((cqe->vlan_my_qpn &
-                           cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)) &&
+                           cpu_to_be32(MLX4_CQE_CVLAN_PRESENT_MASK)) &&
                            (dev->features & NETIF_F_HW_VLAN_CTAG_RX)) {
                                u16 vid = be16_to_cpu(cqe->sl_vid);
 
@@ -970,7 +970,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
                                        PKT_HASH_TYPE_L3);
 
                if ((be32_to_cpu(cqe->vlan_my_qpn) &
-                   MLX4_CQE_VLAN_PRESENT_MASK) &&
+                   MLX4_CQE_CVLAN_PRESENT_MASK) &&
                    (dev->features & NETIF_F_HW_VLAN_CTAG_RX))
                        __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), be16_to_cpu(cqe->sl_vid));
 
index c10d98f6ad967b13640b5d9b2fe033f377565ff0..7c858f67ef28eb62b20e8623113014a232b6a075 100644 (file)
@@ -958,7 +958,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
                ring->bf.offset ^= ring->bf.buf_size;
        } else {
                tx_desc->ctrl.vlan_tag = cpu_to_be16(vlan_tag);
-               tx_desc->ctrl.ins_vlan = MLX4_WQE_CTRL_INS_VLAN *
+               tx_desc->ctrl.ins_vlan = MLX4_WQE_CTRL_INS_CVLAN *
                        !!skb_vlan_tag_present(skb);
                tx_desc->ctrl.fence_size = real_size;
 
index e7ecc12a11636f1afe2f591e019da293ed1f517a..899a97b20d27a445617f1daa017e856b08888657 100644 (file)
@@ -88,7 +88,7 @@ struct mlx4_ts_cqe {
 
 enum {
        MLX4_CQE_L2_TUNNEL_IPOK         = 1 << 31,
-       MLX4_CQE_VLAN_PRESENT_MASK      = 1 << 29,
+       MLX4_CQE_CVLAN_PRESENT_MASK     = 1 << 29,
        MLX4_CQE_L2_TUNNEL              = 1 << 27,
        MLX4_CQE_L2_TUNNEL_CSUM         = 1 << 26,
        MLX4_CQE_L2_TUNNEL_IPV4         = 1 << 25,
index 6fed539e54569c3f0701632a8a17e9bdf16a53d6..6c619006c21f8d6ef65c4a79b25773efac2cb4b6 100644 (file)
@@ -272,7 +272,7 @@ enum {
        MLX4_WQE_CTRL_SOLICITED         = 1 << 1,
        MLX4_WQE_CTRL_IP_CSUM           = 1 << 4,
        MLX4_WQE_CTRL_TCP_UDP_CSUM      = 1 << 5,
-       MLX4_WQE_CTRL_INS_VLAN          = 1 << 6,
+       MLX4_WQE_CTRL_INS_CVLAN         = 1 << 6,
        MLX4_WQE_CTRL_STRONG_ORDER      = 1 << 7,
        MLX4_WQE_CTRL_FORCE_LOOPBACK    = 1 << 0,
 };