> -----Original Message----- > From: ofiwg <[email protected]> On Behalf Of Jason Gunthorpe > Sent: Monday, March 29, 2021 9:02 AM > To: Gal Pressman <[email protected]> > Cc: [email protected] > Subject: Re: [ofiwg] Verbs dma-buf detection question > > On Mon, Mar 29, 2021 at 04:52:43PM +0300, Gal Pressman via ofiwg wrote: > > Hey, > > > > I'm looking at the code that tests the kernel for umem dma-buf support > > in > > vrb_set_dmabuf_support() and wondering if I'm missing anything. > > > > The code checks /proc/kallsyms for the ib_umem_dmabuf_get() symbol > > existence, which kinda treats it as ABI, although the kernel symbol > > name could change at any time. > > > > Wondering what other people thoughts are? Maybe a better detection > > method is called for? > > Expunge such an ridiculous thing from libfabric with fire. > > Call ib_umem_dmabuf_get() and check for EOPNOTSUPP > > Jason
This is a kernel symbol, can't be called from user space like that. By the way, the function vrb_set_dmabuf_support() works exactly like another function vrb_set_peer_mem_support(), the difference is the kernel symbol being checked. Any suggestion on better way to do this is welcome. -Jianxin > _______________________________________________ > ofiwg mailing list > [email protected] > https://lists.openfabrics.org/mailman/listinfo/ofiwg _______________________________________________ ofiwg mailing list [email protected] https://lists.openfabrics.org/mailman/listinfo/ofiwg
