RDMA/hns: Do shift on traffic class when using RoCEv2
authorWeihang Li <liweihang@huawei.com>
Fri, 11 Dec 2020 01:37:29 +0000 (09:37 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Dec 2020 19:21:33 +0000 (15:21 -0400)
commit603bee935f38080a3674c763c50787751e387779
tree7fa8aa29a0b6c94dfcf6368061f108379453d3bb
parent4ddeacf68a3dd05f346b63f4507e1032a15cc3cc
RDMA/hns: Do shift on traffic class when using RoCEv2

The high 6 bits of traffic class in GRH is DSCP (Differentiated Services
Codepoint), the driver should shift it before the hardware gets it when
using RoCEv2.

Fixes: 606bf89e98ef ("RDMA/hns: Refactor for hns_roce_v2_modify_qp function")
Fixes: fba429fcf9a5 ("RDMA/hns: Fix missing fields in address vector")
Link: https://lore.kernel.org/r/1607650657-35992-4-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_ah.c
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c