Skip to content

Commit d34ac5c

Browse files
KAGA-KOKOjgunthorpe
authored andcommitted
RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const
Since neither ib_post_send() nor ib_post_recv() modify the data structure their second argument points at, declare that argument const. This change makes it necessary to declare the 'bad_wr' argument const too and also to modify all ULPs that call ib_post_send(), ib_post_recv() or ib_post_srq_recv(). This patch does not change any functionality but makes it possible for the compiler to verify whether the ib_post_(send|recv|srq_recv) really do not modify the posted work request. To make this possible, only one cast had to be introduce that casts away constness, namely in rpcrdma_post_recvs(). The only way I can think of to avoid that cast is to introduce an additional loop in that function or to change the data type of bad_wr from struct ib_recv_wr ** into int (an index that refers to an element in the work request list). However, both approaches would require even more extensive changes than this patch. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 7bb1faf commit d34ac5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+257
-241
lines changed

drivers/infiniband/core/uverbs_cmd.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,8 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file,
21552155
struct ib_uverbs_post_send cmd;
21562156
struct ib_uverbs_post_send_resp resp;
21572157
struct ib_uverbs_send_wr *user_wr;
2158-
struct ib_send_wr *wr = NULL, *last, *next, *bad_wr;
2158+
struct ib_send_wr *wr = NULL, *last, *next;
2159+
const struct ib_send_wr *bad_wr;
21592160
struct ib_qp *qp;
21602161
int i, sg_ind;
21612162
int is_ud;
@@ -2434,7 +2435,8 @@ ssize_t ib_uverbs_post_recv(struct ib_uverbs_file *file,
24342435
{
24352436
struct ib_uverbs_post_recv cmd;
24362437
struct ib_uverbs_post_recv_resp resp;
2437-
struct ib_recv_wr *wr, *next, *bad_wr;
2438+
struct ib_recv_wr *wr, *next;
2439+
const struct ib_recv_wr *bad_wr;
24382440
struct ib_qp *qp;
24392441
ssize_t ret = -EINVAL;
24402442

@@ -2483,7 +2485,8 @@ ssize_t ib_uverbs_post_srq_recv(struct ib_uverbs_file *file,
24832485
{
24842486
struct ib_uverbs_post_srq_recv cmd;
24852487
struct ib_uverbs_post_srq_recv_resp resp;
2486-
struct ib_recv_wr *wr, *next, *bad_wr;
2488+
struct ib_recv_wr *wr, *next;
2489+
const struct ib_recv_wr *bad_wr;
24872490
struct ib_srq *srq;
24882491
ssize_t ret = -EINVAL;
24892492

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,8 @@ int bnxt_re_query_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr)
15191519
return 0;
15201520
}
15211521

1522-
int bnxt_re_post_srq_recv(struct ib_srq *ib_srq, struct ib_recv_wr *wr,
1523-
struct ib_recv_wr **bad_wr)
1522+
int bnxt_re_post_srq_recv(struct ib_srq *ib_srq, const struct ib_recv_wr *wr,
1523+
const struct ib_recv_wr **bad_wr)
15241524
{
15251525
struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
15261526
ib_srq);
@@ -2048,7 +2048,7 @@ static int bnxt_re_build_qp1_send_v2(struct bnxt_re_qp *qp,
20482048
* and the MAD datagram out to the provided SGE.
20492049
*/
20502050
static int bnxt_re_build_qp1_shadow_qp_recv(struct bnxt_re_qp *qp,
2051-
struct ib_recv_wr *wr,
2051+
const struct ib_recv_wr *wr,
20522052
struct bnxt_qplib_swqe *wqe,
20532053
int payload_size)
20542054
{
@@ -2361,8 +2361,8 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
23612361
return rc;
23622362
}
23632363

2364-
int bnxt_re_post_send(struct ib_qp *ib_qp, struct ib_send_wr *wr,
2365-
struct ib_send_wr **bad_wr)
2364+
int bnxt_re_post_send(struct ib_qp *ib_qp, const struct ib_send_wr *wr,
2365+
const struct ib_send_wr **bad_wr)
23662366
{
23672367
struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
23682368
struct bnxt_qplib_swqe wqe;
@@ -2461,7 +2461,7 @@ int bnxt_re_post_send(struct ib_qp *ib_qp, struct ib_send_wr *wr,
24612461

24622462
static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
24632463
struct bnxt_re_qp *qp,
2464-
struct ib_recv_wr *wr)
2464+
const struct ib_recv_wr *wr)
24652465
{
24662466
struct bnxt_qplib_swqe wqe;
24672467
int rc = 0;
@@ -2494,8 +2494,8 @@ static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
24942494
return rc;
24952495
}
24962496

2497-
int bnxt_re_post_recv(struct ib_qp *ib_qp, struct ib_recv_wr *wr,
2498-
struct ib_recv_wr **bad_wr)
2497+
int bnxt_re_post_recv(struct ib_qp *ib_qp, const struct ib_recv_wr *wr,
2498+
const struct ib_recv_wr **bad_wr)
24992499
{
25002500
struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
25012501
struct bnxt_qplib_swqe wqe;

drivers/infiniband/hw/bnxt_re/ib_verbs.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ int bnxt_re_modify_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr,
181181
struct ib_udata *udata);
182182
int bnxt_re_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
183183
int bnxt_re_destroy_srq(struct ib_srq *srq);
184-
int bnxt_re_post_srq_recv(struct ib_srq *srq, struct ib_recv_wr *recv_wr,
185-
struct ib_recv_wr **bad_recv_wr);
184+
int bnxt_re_post_srq_recv(struct ib_srq *srq, const struct ib_recv_wr *recv_wr,
185+
const struct ib_recv_wr **bad_recv_wr);
186186
struct ib_qp *bnxt_re_create_qp(struct ib_pd *pd,
187187
struct ib_qp_init_attr *qp_init_attr,
188188
struct ib_udata *udata);
@@ -191,10 +191,10 @@ int bnxt_re_modify_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
191191
int bnxt_re_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
192192
int qp_attr_mask, struct ib_qp_init_attr *qp_init_attr);
193193
int bnxt_re_destroy_qp(struct ib_qp *qp);
194-
int bnxt_re_post_send(struct ib_qp *qp, struct ib_send_wr *send_wr,
195-
struct ib_send_wr **bad_send_wr);
196-
int bnxt_re_post_recv(struct ib_qp *qp, struct ib_recv_wr *recv_wr,
197-
struct ib_recv_wr **bad_recv_wr);
194+
int bnxt_re_post_send(struct ib_qp *qp, const struct ib_send_wr *send_wr,
195+
const struct ib_send_wr **bad_send_wr);
196+
int bnxt_re_post_recv(struct ib_qp *qp, const struct ib_recv_wr *recv_wr,
197+
const struct ib_recv_wr **bad_recv_wr);
198198
struct ib_cq *bnxt_re_create_cq(struct ib_device *ibdev,
199199
const struct ib_cq_init_attr *attr,
200200
struct ib_ucontext *context,

drivers/infiniband/hw/cxgb3/iwch_provider.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ enum iwch_qp_query_flags {
326326
};
327327

328328
u16 iwch_rqes_posted(struct iwch_qp *qhp);
329-
int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
330-
struct ib_send_wr **bad_wr);
331-
int iwch_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
332-
struct ib_recv_wr **bad_wr);
329+
int iwch_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
330+
const struct ib_send_wr **bad_wr);
331+
int iwch_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
332+
const struct ib_recv_wr **bad_wr);
333333
int iwch_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
334334
int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg);
335335
int iwch_post_zb_read(struct iwch_ep *ep);

drivers/infiniband/hw/cxgb3/iwch_qp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list,
246246
}
247247

248248
static int build_rdma_recv(struct iwch_qp *qhp, union t3_wr *wqe,
249-
struct ib_recv_wr *wr)
249+
const struct ib_recv_wr *wr)
250250
{
251251
int i, err = 0;
252252
u32 pbl_addr[T3_MAX_SGE];
@@ -286,7 +286,7 @@ static int build_rdma_recv(struct iwch_qp *qhp, union t3_wr *wqe,
286286
}
287287

288288
static int build_zero_stag_recv(struct iwch_qp *qhp, union t3_wr *wqe,
289-
struct ib_recv_wr *wr)
289+
const struct ib_recv_wr *wr)
290290
{
291291
int i;
292292
u32 pbl_addr;
@@ -348,8 +348,8 @@ static int build_zero_stag_recv(struct iwch_qp *qhp, union t3_wr *wqe,
348348
return 0;
349349
}
350350

351-
int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
352-
struct ib_send_wr **bad_wr)
351+
int iwch_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
352+
const struct ib_send_wr **bad_wr)
353353
{
354354
int err = 0;
355355
u8 uninitialized_var(t3_wr_flit_cnt);
@@ -463,8 +463,8 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
463463
return err;
464464
}
465465

466-
int iwch_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
467-
struct ib_recv_wr **bad_wr)
466+
int iwch_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
467+
const struct ib_recv_wr **bad_wr)
468468
{
469469
int err = 0;
470470
struct iwch_qp *qhp;

drivers/infiniband/hw/cxgb4/iw_cxgb4.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,10 +1033,10 @@ void c4iw_release_dev_ucontext(struct c4iw_rdev *rdev,
10331033
void c4iw_init_dev_ucontext(struct c4iw_rdev *rdev,
10341034
struct c4iw_dev_ucontext *uctx);
10351035
int c4iw_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
1036-
int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1037-
struct ib_send_wr **bad_wr);
1038-
int c4iw_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
1039-
struct ib_recv_wr **bad_wr);
1036+
int c4iw_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
1037+
const struct ib_send_wr **bad_wr);
1038+
int c4iw_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
1039+
const struct ib_recv_wr **bad_wr);
10401040
int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param);
10411041
int c4iw_create_listen(struct iw_cm_id *cm_id, int backlog);
10421042
int c4iw_destroy_listen(struct iw_cm_id *cm_id);
@@ -1119,8 +1119,8 @@ void c4iw_invalidate_mr(struct c4iw_dev *rhp, u32 rkey);
11191119
void c4iw_dispatch_srq_limit_reached_event(struct c4iw_srq *srq);
11201120
void c4iw_copy_wr_to_srq(struct t4_srq *srq, union t4_recv_wr *wqe, u8 len16);
11211121
void c4iw_flush_srqidx(struct c4iw_qp *qhp, u32 srqidx);
1122-
int c4iw_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
1123-
struct ib_recv_wr **bad_wr);
1122+
int c4iw_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
1123+
const struct ib_recv_wr **bad_wr);
11241124
struct c4iw_wr_wait *c4iw_alloc_wr_wait(gfp_t gfp);
11251125

11261126
typedef int c4iw_restrack_func(struct sk_buff *msg,

drivers/infiniband/hw/cxgb4/qp.c

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static int build_rdma_read(union t4_wr *wqe, const struct ib_send_wr *wr,
620620
}
621621

622622
static int build_rdma_recv(struct c4iw_qp *qhp, union t4_recv_wr *wqe,
623-
struct ib_recv_wr *wr, u8 *len16)
623+
const struct ib_recv_wr *wr, u8 *len16)
624624
{
625625
int ret;
626626

@@ -634,7 +634,7 @@ static int build_rdma_recv(struct c4iw_qp *qhp, union t4_recv_wr *wqe,
634634
return 0;
635635
}
636636

637-
static int build_srq_recv(union t4_recv_wr *wqe, struct ib_recv_wr *wr,
637+
static int build_srq_recv(union t4_recv_wr *wqe, const struct ib_recv_wr *wr,
638638
u8 *len16)
639639
{
640640
int ret;
@@ -903,8 +903,9 @@ static int complete_sq_drain_wr(struct c4iw_qp *qhp,
903903
return 0;
904904
}
905905

906-
static int complete_sq_drain_wrs(struct c4iw_qp *qhp, struct ib_send_wr *wr,
907-
struct ib_send_wr **bad_wr)
906+
static int complete_sq_drain_wrs(struct c4iw_qp *qhp,
907+
const struct ib_send_wr *wr,
908+
const struct ib_send_wr **bad_wr)
908909
{
909910
int ret = 0;
910911

@@ -919,7 +920,8 @@ static int complete_sq_drain_wrs(struct c4iw_qp *qhp, struct ib_send_wr *wr,
919920
return ret;
920921
}
921922

922-
static void complete_rq_drain_wr(struct c4iw_qp *qhp, struct ib_recv_wr *wr)
923+
static void complete_rq_drain_wr(struct c4iw_qp *qhp,
924+
const struct ib_recv_wr *wr)
923925
{
924926
struct t4_cqe cqe = {};
925927
struct c4iw_cq *rchp;
@@ -951,16 +953,17 @@ static void complete_rq_drain_wr(struct c4iw_qp *qhp, struct ib_recv_wr *wr)
951953
}
952954
}
953955

954-
static void complete_rq_drain_wrs(struct c4iw_qp *qhp, struct ib_recv_wr *wr)
956+
static void complete_rq_drain_wrs(struct c4iw_qp *qhp,
957+
const struct ib_recv_wr *wr)
955958
{
956959
while (wr) {
957960
complete_rq_drain_wr(qhp, wr);
958961
wr = wr->next;
959962
}
960963
}
961964

962-
int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
963-
struct ib_send_wr **bad_wr)
965+
int c4iw_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
966+
const struct ib_send_wr **bad_wr)
964967
{
965968
int err = 0;
966969
u8 len16 = 0;
@@ -1110,8 +1113,8 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
11101113
return err;
11111114
}
11121115

1113-
int c4iw_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
1114-
struct ib_recv_wr **bad_wr)
1116+
int c4iw_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
1117+
const struct ib_recv_wr **bad_wr)
11151118
{
11161119
int err = 0;
11171120
struct c4iw_qp *qhp;
@@ -1206,8 +1209,8 @@ static void defer_srq_wr(struct t4_srq *srq, union t4_recv_wr *wqe,
12061209
t4_srq_produce_pending_wr(srq);
12071210
}
12081211

1209-
int c4iw_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
1210-
struct ib_recv_wr **bad_wr)
1212+
int c4iw_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
1213+
const struct ib_recv_wr **bad_wr)
12111214
{
12121215
union t4_recv_wr *wqe, lwqe;
12131216
struct c4iw_srq *srq;

drivers/infiniband/hw/hns/hns_roce_device.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,10 @@ struct hns_roce_hw {
763763
int attr_mask, enum ib_qp_state cur_state,
764764
enum ib_qp_state new_state);
765765
int (*destroy_qp)(struct ib_qp *ibqp);
766-
int (*post_send)(struct ib_qp *ibqp, struct ib_send_wr *wr,
767-
struct ib_send_wr **bad_wr);
768-
int (*post_recv)(struct ib_qp *qp, struct ib_recv_wr *recv_wr,
769-
struct ib_recv_wr **bad_recv_wr);
766+
int (*post_send)(struct ib_qp *ibqp, const struct ib_send_wr *wr,
767+
const struct ib_send_wr **bad_wr);
768+
int (*post_recv)(struct ib_qp *qp, const struct ib_recv_wr *recv_wr,
769+
const struct ib_recv_wr **bad_recv_wr);
770770
int (*req_notify_cq)(struct ib_cq *ibcq, enum ib_cq_notify_flags flags);
771771
int (*poll_cq)(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
772772
int (*dereg_mr)(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr);

drivers/infiniband/hw/hns/hns_roce_hw_v1.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ static void set_raddr_seg(struct hns_roce_wqe_raddr_seg *rseg, u64 remote_addr,
5858
rseg->len = 0;
5959
}
6060

61-
static int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
62-
struct ib_send_wr **bad_wr)
61+
static int hns_roce_v1_post_send(struct ib_qp *ibqp,
62+
const struct ib_send_wr *wr,
63+
const struct ib_send_wr **bad_wr)
6364
{
6465
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
6566
struct hns_roce_ah *ah = to_hr_ah(ud_wr(wr)->ah);
@@ -342,8 +343,9 @@ static int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
342343
return ret;
343344
}
344345

345-
static int hns_roce_v1_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
346-
struct ib_recv_wr **bad_wr)
346+
static int hns_roce_v1_post_recv(struct ib_qp *ibqp,
347+
const struct ib_recv_wr *wr,
348+
const struct ib_recv_wr **bad_wr)
347349
{
348350
int ret = 0;
349351
int nreq = 0;
@@ -993,7 +995,8 @@ static int hns_roce_v1_send_lp_wqe(struct hns_roce_qp *hr_qp)
993995
{
994996
struct hns_roce_dev *hr_dev = to_hr_dev(hr_qp->ibqp.device);
995997
struct device *dev = &hr_dev->pdev->dev;
996-
struct ib_send_wr send_wr, *bad_wr;
998+
struct ib_send_wr send_wr;
999+
const struct ib_send_wr *bad_wr;
9971000
int ret;
9981001

9991002
memset(&send_wr, 0, sizeof(send_wr));

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static void set_extend_sge(struct hns_roce_qp *qp, const struct ib_send_wr *wr,
103103
static int set_rwqe_data_seg(struct ib_qp *ibqp, const struct ib_send_wr *wr,
104104
struct hns_roce_v2_rc_send_wqe *rc_sq_wqe,
105105
void *wqe, unsigned int *sge_ind,
106-
struct ib_send_wr **bad_wr)
106+
const struct ib_send_wr **bad_wr)
107107
{
108108
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
109109
struct hns_roce_v2_wqe_data_seg *dseg = wqe;
@@ -164,8 +164,9 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, const struct ib_send_wr *wr,
164164
return 0;
165165
}
166166

167-
static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
168-
struct ib_send_wr **bad_wr)
167+
static int hns_roce_v2_post_send(struct ib_qp *ibqp,
168+
const struct ib_send_wr *wr,
169+
const struct ib_send_wr **bad_wr)
169170
{
170171
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
171172
struct hns_roce_ah *ah = to_hr_ah(ud_wr(wr)->ah);
@@ -530,8 +531,9 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
530531
return ret;
531532
}
532533

533-
static int hns_roce_v2_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
534-
struct ib_recv_wr **bad_wr)
534+
static int hns_roce_v2_post_recv(struct ib_qp *ibqp,
535+
const struct ib_recv_wr *wr,
536+
const struct ib_recv_wr **bad_wr)
535537
{
536538
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
537539
struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);

drivers/infiniband/hw/i40iw/i40iw_verbs.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,8 +2201,8 @@ static void i40iw_copy_sg_list(struct i40iw_sge *sg_list, struct ib_sge *sgl, in
22012201
* @bad_wr: return of bad wr if err
22022202
*/
22032203
static int i40iw_post_send(struct ib_qp *ibqp,
2204-
struct ib_send_wr *ib_wr,
2205-
struct ib_send_wr **bad_wr)
2204+
const struct ib_send_wr *ib_wr,
2205+
const struct ib_send_wr **bad_wr)
22062206
{
22072207
struct i40iw_qp *iwqp;
22082208
struct i40iw_qp_uk *ukqp;
@@ -2377,9 +2377,8 @@ static int i40iw_post_send(struct ib_qp *ibqp,
23772377
* @ib_wr: work request for receive
23782378
* @bad_wr: bad wr caused an error
23792379
*/
2380-
static int i40iw_post_recv(struct ib_qp *ibqp,
2381-
struct ib_recv_wr *ib_wr,
2382-
struct ib_recv_wr **bad_wr)
2380+
static int i40iw_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *ib_wr,
2381+
const struct ib_recv_wr **bad_wr)
23832382
{
23842383
struct i40iw_qp *iwqp;
23852384
struct i40iw_qp_uk *ukqp;

0 commit comments

Comments
 (0)