RE: [PATCH v2 2/4] RDMA: Constify the argument of the work request conversion functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Bart Van Assche
>Sent: Friday, July 6, 2018 7:08 PM
>To: Jason Gunthorpe <jgg@xxxxxxxx>
>Cc: Doug Ledford <dledford@xxxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx; Bart
>Van Assche <bart.vanassche@xxxxxxx>; Ariel Elior
><Ariel.Elior@xxxxxxxxxx>; Dalessandro, Dennis
><dennis.dalessandro@xxxxxxxxx>; Devesh Sharma
><devesh.sharma@xxxxxxxxxxxx>; Latif, Faisal <faisal.latif@xxxxxxxxx>; Leon
>Romanovsky <leonro@xxxxxxxxxxxx>; Lijun Ou <oulijun@xxxxxxxxxx>;
>Michal Kalderon <Michal.Kalderon@xxxxxxxxxx>; Marciniszyn, Mike
><mike.marciniszyn@xxxxxxxxx>; Moni Shoua <monis@xxxxxxxxxxxx>; Parav
>Pandit <parav@xxxxxxxxxxxx>; Selvin Xavier
><selvin.xavier@xxxxxxxxxxxx>; Somnath Kotur
><somnath.kotur@xxxxxxxxxxxx>; Sriharsha Basavapatna
><sriharsha.basavapatna@xxxxxxxxxxxx>; Steve Wise <swise@xxxxxxxxxxx>;
>Wei Hu <xavier.huwei@xxxxxxxxxx>; Yishai Hadas <yishaih@xxxxxxxxxxxx>
>Subject: [PATCH v2 2/4] RDMA: Constify the argument of the work request
>conversion functions
>
>When posting a send work request, the work request that is posted is
>not modified by any of the RDMA drivers. Make this explicit by
>constifying most ib_send_wr pointers in RDMA transport drivers.
>
>Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
>Cc: Ariel Elior <Ariel.Elior@xxxxxxxxxx>
>Cc: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
>Cc: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
>Cc: Faisal Latif <faisal.latif@xxxxxxxxx>
>Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>Cc: Lijun Ou <oulijun@xxxxxxxxxx>
>Cc: Michal Kalderon <Michal.Kalderon@xxxxxxxxxx>
>Cc: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
>Cc: Moni Shoua <monis@xxxxxxxxxxxx>
>Cc: Parav Pandit <parav@xxxxxxxxxxxx>
>Cc: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
>Cc: Somnath Kotur <somnath.kotur@xxxxxxxxxxxx>
>Cc: Sriharsha Basavapatna <sriharsha.basavapatna@xxxxxxxxxxxx>
>Cc: Steve Wise <swise@xxxxxxxxxxx>
>Cc: Wei Hu(Xavier) <xavier.huwei@xxxxxxxxxx>
>Cc: Yishai Hadas <yishaih@xxxxxxxxxxxx>
>---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c   |  7 +++--
> 18 files changed, 99 insertions(+), 89 deletions(-)
>

>diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>index d8c68db4497f..4793e1cc98e6 100644
>--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>@@ -53,7 +53,7 @@ static void set_data_seg_v2(struct
>hns_roce_v2_wqe_data_seg *dseg,
> 	dseg->len  = cpu_to_le32(sg->length);
> }
>
>-static void set_extend_sge(struct hns_roce_qp *qp, struct ib_send_wr *wr,
>+static void set_extend_sge(struct hns_roce_qp *qp, const struct
>ib_send_wr *wr,
> 			   unsigned int *sge_ind)
> {
> 	struct hns_roce_v2_wqe_data_seg *dseg;
>@@ -100,7 +100,7 @@ static void set_extend_sge(struct hns_roce_qp *qp,
>struct ib_send_wr *wr,
> 	}
> }
>
>-static int set_rwqe_data_seg(struct ib_qp *ibqp, struct ib_send_wr *wr,
>+static int set_rwqe_data_seg(struct ib_qp *ibqp, const struct ib_send_wr
>*wr,
> 			     struct hns_roce_v2_rc_send_wqe *rc_sq_wqe,
> 			     void *wqe, unsigned int *sge_ind,
> 			     struct ib_send_wr **bad_wr)
>@@ -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,

So you decided this didn't need a const?

Is the white space update necessary?

Thanks,

M

> 				 struct ib_send_wr **bad_wr)
> {
> 	struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux