Linux CIFS filesystem development
 help / color / mirror / Atom feed
* Does ib_dereg_mr require an additional IB_WR_LOCAL_INV?
@ 2025-09-23 21:09 Stefan Metzmacher
  2025-09-24 15:10 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Metzmacher @ 2025-09-23 21:09 UTC (permalink / raw)
  To: linux-rdma@vger.kernel.org, linux-cifs@vger.kernel.org

Hi,

I'm trying to understand (and hopefully simplify) the code in fs/smb/client/smbdirect.c,
related to 'struct ib_mr' cleanup on disconnect.

Assume we have the following sequence of calls:

...
ib_alloc_mr()
ib_dma_map_sg()
ib_map_mr_sg()
ib_post_send(IB_WR_REG_MR)

On cleanup we currently us something like this:

ib_drain_qp()
init_completion()
ib_post_send(IB_WR_LOCAL_INV)
wait_for_completion()...
ib_dereg_mr()
ib_drain_qp() // again
rdma_destroy_qp();
ib_destroy_cq(revc_cq)
ib_destroy_cq(send_cq)
ib_dealloc_pd()
rdma_destroy_id()

Now I'm wondering if the following is really required:
init_completion()
ib_post_send(IB_WR_LOCAL_INV)
wait_for_completion()...

It would make things much easier if not...

Thanks for any possible hint :-)
metze

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-25 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 21:09 Does ib_dereg_mr require an additional IB_WR_LOCAL_INV? Stefan Metzmacher
2025-09-24 15:10 ` Jason Gunthorpe
2025-09-25 11:21   ` Stefan Metzmacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox