.. | .. |
---|
134 | 134 | return -EMSGSIZE; |
---|
135 | 135 | } |
---|
136 | 136 | |
---|
137 | | -static int fill_res_qp_entry(struct sk_buff *msg, |
---|
138 | | - struct rdma_restrack_entry *res) |
---|
| 137 | +int c4iw_fill_res_qp_entry(struct sk_buff *msg, struct ib_qp *ibqp) |
---|
139 | 138 | { |
---|
140 | | - struct ib_qp *ibqp = container_of(res, struct ib_qp, res); |
---|
141 | 139 | struct t4_swsqe *fsp = NULL, *lsp = NULL; |
---|
142 | 140 | struct c4iw_qp *qhp = to_c4iw_qp(ibqp); |
---|
143 | 141 | u16 first_sq_idx = 0, last_sq_idx = 0; |
---|
.. | .. |
---|
149 | 147 | if (qhp->ucontext) |
---|
150 | 148 | return 0; |
---|
151 | 149 | |
---|
152 | | - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
| 150 | + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
153 | 151 | if (!table_attr) |
---|
154 | 152 | goto err; |
---|
155 | 153 | |
---|
.. | .. |
---|
195 | 193 | struct c4iw_ep ep; |
---|
196 | 194 | }; |
---|
197 | 195 | |
---|
198 | | -static int fill_res_ep_entry(struct sk_buff *msg, |
---|
199 | | - struct rdma_restrack_entry *res) |
---|
| 196 | +int c4iw_fill_res_cm_id_entry(struct sk_buff *msg, |
---|
| 197 | + struct rdma_cm_id *cm_id) |
---|
200 | 198 | { |
---|
201 | | - struct rdma_cm_id *cm_id = rdma_res_to_id(res); |
---|
202 | 199 | struct nlattr *table_attr; |
---|
203 | 200 | struct c4iw_ep_common *epcp; |
---|
204 | 201 | struct c4iw_listen_ep *listen_ep = NULL; |
---|
.. | .. |
---|
216 | 213 | if (!uep) |
---|
217 | 214 | return 0; |
---|
218 | 215 | |
---|
219 | | - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
| 216 | + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
220 | 217 | if (!table_attr) |
---|
221 | 218 | goto err_free_uep; |
---|
222 | 219 | |
---|
.. | .. |
---|
372 | 369 | return -EMSGSIZE; |
---|
373 | 370 | } |
---|
374 | 371 | |
---|
375 | | -static int fill_res_cq_entry(struct sk_buff *msg, |
---|
376 | | - struct rdma_restrack_entry *res) |
---|
| 372 | +int c4iw_fill_res_cq_entry(struct sk_buff *msg, struct ib_cq *ibcq) |
---|
377 | 373 | { |
---|
378 | | - struct ib_cq *ibcq = container_of(res, struct ib_cq, res); |
---|
379 | 374 | struct c4iw_cq *chp = to_c4iw_cq(ibcq); |
---|
380 | 375 | struct nlattr *table_attr; |
---|
381 | 376 | struct t4_cqe hwcqes[2]; |
---|
.. | .. |
---|
387 | 382 | if (ibcq->uobject) |
---|
388 | 383 | return 0; |
---|
389 | 384 | |
---|
390 | | - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
| 385 | + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
391 | 386 | if (!table_attr) |
---|
392 | 387 | goto err; |
---|
393 | 388 | |
---|
.. | .. |
---|
433 | 428 | return -EMSGSIZE; |
---|
434 | 429 | } |
---|
435 | 430 | |
---|
436 | | -static int fill_res_mr_entry(struct sk_buff *msg, |
---|
437 | | - struct rdma_restrack_entry *res) |
---|
| 431 | +int c4iw_fill_res_mr_entry(struct sk_buff *msg, struct ib_mr *ibmr) |
---|
438 | 432 | { |
---|
439 | | - struct ib_mr *ibmr = container_of(res, struct ib_mr, res); |
---|
440 | 433 | struct c4iw_mr *mhp = to_c4iw_mr(ibmr); |
---|
441 | 434 | struct c4iw_dev *dev = mhp->rhp; |
---|
442 | 435 | u32 stag = mhp->attr.stag; |
---|
.. | .. |
---|
447 | 440 | if (!stag) |
---|
448 | 441 | return 0; |
---|
449 | 442 | |
---|
450 | | - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
| 443 | + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); |
---|
451 | 444 | if (!table_attr) |
---|
452 | 445 | goto err; |
---|
453 | 446 | |
---|
.. | .. |
---|
492 | 485 | err: |
---|
493 | 486 | return -EMSGSIZE; |
---|
494 | 487 | } |
---|
495 | | - |
---|
496 | | -c4iw_restrack_func *c4iw_restrack_funcs[RDMA_RESTRACK_MAX] = { |
---|
497 | | - [RDMA_RESTRACK_QP] = fill_res_qp_entry, |
---|
498 | | - [RDMA_RESTRACK_CM_ID] = fill_res_ep_entry, |
---|
499 | | - [RDMA_RESTRACK_CQ] = fill_res_cq_entry, |
---|
500 | | - [RDMA_RESTRACK_MR] = fill_res_mr_entry, |
---|
501 | | -}; |
---|