summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/cq.c
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2014-01-22 23:24:21 -0800
committerRoland Dreier <roland@purestorage.com>2014-01-22 23:24:21 -0800
commitfb1b5034e4987b158179a62732fb6dfb8f7ec88e (patch)
tree93d02ff7f0f530286fd54d03b632c6eaabc9dcc9 /drivers/infiniband/hw/mlx4/cq.c
parent8f399921ea9a562bc8221258c4b8a7bd69577939 (diff)
parent27cdef637c25705b433d5c4deeef4cf8dcb75d6a (diff)
downloadtalos-obmc-linux-fb1b5034e4987b158179a62732fb6dfb8f7ec88e.tar.gz
talos-obmc-linux-fb1b5034e4987b158179a62732fb6dfb8f7ec88e.zip
Merge branch 'ip-roce' into for-next
Conflicts: drivers/infiniband/hw/mlx4/main.c
Diffstat (limited to 'drivers/infiniband/hw/mlx4/cq.c')
-rw-r--r--drivers/infiniband/hw/mlx4/cq.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index 66dbf8062374..cc40f08ca8f1 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -798,6 +798,15 @@ repoll:
wc->sl = be16_to_cpu(cqe->sl_vid) >> 13;
else
wc->sl = be16_to_cpu(cqe->sl_vid) >> 12;
+ if (be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_VLAN_PRESENT_MASK) {
+ wc->vlan_id = be16_to_cpu(cqe->sl_vid) &
+ MLX4_CQE_VID_MASK;
+ } else {
+ wc->vlan_id = 0xffff;
+ }
+ wc->wc_flags |= IB_WC_WITH_VLAN;
+ memcpy(wc->smac, cqe->smac, ETH_ALEN);
+ wc->wc_flags |= IB_WC_WITH_SMAC;
}
return 0;
OpenPOWER on IntegriCloud