[ofiwg] Verbs dma-buf detection question

Xiong, Jianxin jianxin.xiong at intel.com
Mon Mar 29 10:04:10 PDT 2021


> -----Original Message-----
> From: ofiwg <ofiwg-bounces at lists.openfabrics.org> On Behalf Of Jason Gunthorpe
> Sent: Monday, March 29, 2021 9:02 AM
> To: Gal Pressman <galpress at amazon.com>
> Cc: ofiwg at lists.openfabrics.org
> 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
> ofiwg at lists.openfabrics.org
> https://lists.openfabrics.org/mailman/listinfo/ofiwg


More information about the ofiwg mailing list