Message ID | 1514287514-88723-7-git-send-email-oulijun@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Tue, Dec 26, 2017 at 07:25:14PM +0800, Lijun Ou wrote: > It needs to create eight reserve QPs for resolving > a bug of hip06. When deregistering mr, it will issue > a rdma write for every reserve QPs. > > In the above process, it needs to assign dest_qp. > Otherwise, it will trigger free mr work fail. > > Signed-off-by: Lijun Ou <oulijun@huawei.com> > drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c > index 6100ace..490a1fc 100644 > +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c > @@ -775,6 +775,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) > goto create_lp_qp_failed; > } > > + attr_mask |= IB_QP_DEST_QPN; This seems really weird, several other values of attr are set without a corresponding attr_mask bit. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
在 2017/12/29 5:32, Jason Gunthorpe 写道: > On Tue, Dec 26, 2017 at 07:25:14PM +0800, Lijun Ou wrote: >> It needs to create eight reserve QPs for resolving >> a bug of hip06. When deregistering mr, it will issue >> a rdma write for every reserve QPs. >> >> In the above process, it needs to assign dest_qp. >> Otherwise, it will trigger free mr work fail. >> >> Signed-off-by: Lijun Ou <oulijun@huawei.com> >> drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c >> index 6100ace..490a1fc 100644 >> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c >> @@ -775,6 +775,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) >> goto create_lp_qp_failed; >> } >> >> + attr_mask |= IB_QP_DEST_QPN; > > This seems really weird, several other values of attr are set without a > corresponding attr_mask bit. > > Jason Yes, Maybe other fileds which need to attr_mask bit need to work in this scene. Are you? > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index 6100ace..490a1fc 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@ -775,6 +775,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) goto create_lp_qp_failed; } + attr_mask |= IB_QP_DEST_QPN; ret = hr_dev->hw->modify_qp(&hr_qp->ibqp, &attr, attr_mask, IB_QPS_INIT, IB_QPS_RTR); if (ret) {
It needs to create eight reserve QPs for resolving a bug of hip06. When deregistering mr, it will issue a rdma write for every reserve QPs. In the above process, it needs to assign dest_qp. Otherwise, it will trigger free mr work fail. Signed-off-by: Lijun Ou <oulijun@huawei.com> --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + 1 file changed, 1 insertion(+)