[ofiwg] Verbs dma-buf detection question

Hefty, Sean sean.hefty at intel.com
Mon Mar 29 12:35:04 PDT 2021


> > > 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.

vrb_set_peer_mem_support() is looking for ib_register_peer_memory_client().  Isn't that an out of tree Mellanox/Nvidia specific function?  I don't know if there's a user space mechanism that can be checked.

vrb_set_dmabuf_support() could probably check the success of ibv_reg_dmabuf_mr().

- Sean


More information about the ofiwg mailing list