]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
RDMA/hns: Assign zero for pkey_index of wc in hip08
authoroulijun <oulijun@huawei.com>
Wed, 10 Jan 2018 06:39:51 +0000 (14:39 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 15:46:51 +0000 (10:46 -0500)
BugLink: http://bugs.launchpad.net/bugs/1756097
Because pkey is fixed for hip08 RoCE, it needs to assign zero for
pkey_index of wc. otherwise, it will happen an error when establishing
connection by communication management mechanism.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit 6c1f08b347f64de38460d5b3d1eb4a30028869cb)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 908309c102a6a64158ec0a96d52e31e8011d0bee..321f5932bb363a9e12c2db7bc745bc61aab68777 100644 (file)
@@ -1910,6 +1910,9 @@ static int hns_roce_v2_poll_one(struct hns_roce_cq *hr_cq,
                wc->wc_flags |= (roce_get_bit(cqe->byte_32,
                                              V2_CQE_BYTE_32_GRH_S) ?
                                              IB_WC_GRH : 0);
+               wc->port_num = roce_get_field(cqe->byte_32,
+                               V2_CQE_BYTE_32_PORTN_M, V2_CQE_BYTE_32_PORTN_S);
+               wc->pkey_index = 0;
        }
 
        return 0;