diff options
author | Roland Dreier <roland@purestorage.com> | 2014-01-22 23:24:21 -0800 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-22 23:24:21 -0800 |
commit | fb1b5034e4987b158179a62732fb6dfb8f7ec88e (patch) | |
tree | 93d02ff7f0f530286fd54d03b632c6eaabc9dcc9 /drivers/infiniband/hw/mlx4/cq.c | |
parent | 8f399921ea9a562bc8221258c4b8a7bd69577939 (diff) | |
parent | 27cdef637c25705b433d5c4deeef4cf8dcb75d6a (diff) | |
download | talos-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.c | 9 |
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; |