Message ID | 20180706171736.14543-7-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
>-----Original Message----- >From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma- >owner@vger.kernel.org] On Behalf Of Bart Van Assche >Sent: Friday, July 6, 2018 1:17 PM >To: Jason Gunthorpe <jgg@ziepe.ca> >Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart >Van Assche <bart.vanassche@wdc.com>; Lijun Ou <oulijun@huawei.com>; >Wei Hu <xavier.huwei@huawei.com> >Subject: [PATCH 06/13] RDMA/hns: Declare work request pointers that are >not modified const > >Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> >Cc: Lijun Ou <oulijun@huawei.com> >Cc: Wei Hu(Xavier) <xavier.huwei@huawei.com> >--- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >index d8c68db4497f..40cde6dc15d6 100644 >--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >@@ -164,7 +164,8 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, struct >ib_send_wr *wr, > return 0; > } > >-static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, >+static int hns_roce_v2_post_send(struct ib_qp *ibqp, >+ struct ib_send_wr *wr, > struct ib_send_wr **bad_wr) Was one of these supposed to be const? M > { > struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device); >-- >2.18.0 > >-- >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
On Fri, 2018-07-06 at 20:02 +0000, Ruhl, Michael J wrote: > > -----Original Message----- > > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma- > > owner@vger.kernel.org] On Behalf Of Bart Van Assche > > Sent: Friday, July 6, 2018 1:17 PM > > To: Jason Gunthorpe <jgg@ziepe.ca> > > Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart > > Van Assche <bart.vanassche@wdc.com>; Lijun Ou <oulijun@huawei.com>; > > Wei Hu <xavier.huwei@huawei.com> > > Subject: [PATCH 06/13] RDMA/hns: Declare work request pointers that are > > not modified const > > > > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > > Cc: Lijun Ou <oulijun@huawei.com> > > Cc: Wei Hu(Xavier) <xavier.huwei@huawei.com> > > --- > > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > index d8c68db4497f..40cde6dc15d6 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > @@ -164,7 +164,8 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, struct > > ib_send_wr *wr, > > return 0; > > } > > > > -static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, > > +static int hns_roce_v2_post_send(struct ib_qp *ibqp, > > + struct ib_send_wr *wr, > > struct ib_send_wr **bad_wr) > > Was one of these supposed to be const? That's a good question. Initially I did not plan to declare these pointers const since I wasn't sure it would be doable to modify all ULPs that call ib_post_send(). I will have another look at this. Bart.
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index d8c68db4497f..40cde6dc15d6 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -164,7 +164,8 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, struct ib_send_wr *wr, return 0; } -static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, +static int hns_roce_v2_post_send(struct ib_qp *ibqp, + struct ib_send_wr *wr, struct ib_send_wr **bad_wr) { struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Lijun Ou <oulijun@huawei.com> Cc: Wei Hu(Xavier) <xavier.huwei@huawei.com> --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)