[PATCH v11 1/4] RDMA/umem: Support importing dma-buf as user memory region

Jason Gunthorpe jgg at ziepe.ca
Tue Nov 24 18:33:46 UTC 2020


On Tue, Nov 24, 2020 at 06:24:43PM +0000, Xiong, Jianxin wrote:
> > From: Christoph Hellwig <hch at infradead.org>
> > Sent: Tuesday, November 24, 2020 1:34 AM
> > To: Xiong, Jianxin <jianxin.xiong at intel.com>
> > Cc: linux-rdma at vger.kernel.org; dri-devel at lists.freedesktop.org; Doug Ledford <dledford at redhat.com>; Jason Gunthorpe <jgg at ziepe.ca>;
> > Leon Romanovsky <leon at kernel.org>; Sumit Semwal <sumit.semwal at linaro.org>; Christian Koenig <christian.koenig at amd.com>; Vetter,
> > Daniel <daniel.vetter at intel.com>
> > Subject: Re: [PATCH v11 1/4] RDMA/umem: Support importing dma-buf as user memory region
> > 
> > As these are mostly trivial wrappers around the EXPORT_SYMBOL_GPL dmabuf exports please stick to that export style.
> > 
> > > +++ b/drivers/infiniband/core/umem_dmabuf.h
> > > @@ -0,0 +1,11 @@
> > > +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
> > > +/*
> > > + * Copyright (c) 2020 Intel Corporation. All rights reserved.
> > > + */
> > > +
> > > +#ifndef UMEM_DMABUF_H
> > > +#define UMEM_DMABUF_H
> > > +
> > > +void ib_umem_dmabuf_release(struct ib_umem_dmabuf *umem_dmabuf);
> > > +
> > > +#endif /* UMEM_DMABUF_H */
> > 
> > Does this really need a separate header?
> 
> The symbol doesn't need to be exported otherwise it can be put into "ib_umem.h".
> Although the prototype could be put into the file where it is called directly, using a
> separate header file provides a cleaner interface.

It is fine to put this single symbol in ib_umem.h

Thanks
Jason


More information about the dri-devel mailing list