All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Xiong, Jianxin" <jianxin.xiong@intel.com>
To: Leon Romanovsky <leon@kernel.org>, Daniel Vetter <daniel@ffwll.ch>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Gal Pressman <galpress@amazon.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	Edward Srouji <edwards@nvidia.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Christian Koenig <christian.koenig@amd.com>,
	Doug Ledford <dledford@redhat.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>
Subject: RE: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support
Date: Wed, 3 Feb 2021 16:57:04 +0000	[thread overview]
Message-ID: <MW3PR11MB455563A3F337F789613A9940E5B49@MW3PR11MB4555.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210203060320.GK3264866@unreal>

> -----Original Message-----
> From: Leon Romanovsky <leon@kernel.org>
> Sent: Tuesday, February 02, 2021 10:03 PM
> To: Daniel Vetter <daniel@ffwll.ch>
> Cc: Xiong, Jianxin <jianxin.xiong@intel.com>; Jason Gunthorpe <jgg@ziepe.ca>; Gal Pressman <galpress@amazon.com>; Yishai Hadas
> <yishaih@nvidia.com>; linux-rdma <linux-rdma@vger.kernel.org>; Edward Srouji <edwards@nvidia.com>; dri-devel <dri-
> devel@lists.freedesktop.org>; Christian Koenig <christian.koenig@amd.com>; Doug Ledford <dledford@redhat.com>; Vetter, Daniel
> <daniel.vetter@intel.com>
> Subject: Re: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support
> 

<...>

> > > > > > > > +#include <drm/drm.h>
> > > > > > > > +#include <drm/i915_drm.h> #include <drm/amdgpu_drm.h>
> > > > > > > > +#include <drm/radeon_drm.h>
> > > > > > >
> > > > > > > I assume these should come from the kernel headers package, right?
> > > > > >
> > > > > > This is gross, all kernel headers should be placed in
> > > > > > kernel-headers/* and "update" script needs to be extended to take drm/* files too :(.
> > > > >
> > > > > drm kernel headers are in the libdrm package. You need that
> > > > > anyway for doing the ioctls (if you don't hand-roll the restarting yourself).
> > > > >
> > > > > Also our userspace has gone over to just outright copying the
> > > > > driver headers. Not the generic headers, but for the rendering
> > > > > side of gpus, which is the topic here, there's really not much generic stuff.
> > > > >
> > > > > > Jianxin, are you fixing it?
> > > > >
> > > > > So fix is either to depend upon libdrm for building, or have
> > > > > copies of the headers included in the package for the
> > > > > i915/amdgpu/radeon headers (drm/drm.h probably not so good idea).
> > > >
> > > > We should have a cmake test to not build the drm parts if it can't be built, and pyverbs should skip the tests.
> > > >
> > >
> > > Yes, I will add a test for that. Also, on SLES, the headers could be under /usr/include/libdrm instead of /usr/include/drm. The make test
> should check that and use proper path.
> >
> > Please use pkgconfig for this, libdrm installs a .pc file to make sure
> > you can find the right headers.
> 
> rdma-core uses cmake build system and in our case cmake find_library() is preferable over pkgconfig.

Only the headers are needed, and they could be installed via either the libdrm-devel package or the kernel-headers package. The cmake find_path() command is more suitable here.
 
> 
> Thanks
> 
> > -Daniel
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: "Xiong, Jianxin" <jianxin.xiong@intel.com>
To: Leon Romanovsky <leon@kernel.org>, Daniel Vetter <daniel@ffwll.ch>
Cc: Yishai Hadas <yishaih@nvidia.com>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	Edward Srouji <edwards@nvidia.com>,
	Gal Pressman <galpress@amazon.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Doug Ledford <dledford@redhat.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	Christian Koenig <christian.koenig@amd.com>
Subject: RE: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support
Date: Wed, 3 Feb 2021 16:57:04 +0000	[thread overview]
Message-ID: <MW3PR11MB455563A3F337F789613A9940E5B49@MW3PR11MB4555.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210203060320.GK3264866@unreal>

> -----Original Message-----
> From: Leon Romanovsky <leon@kernel.org>
> Sent: Tuesday, February 02, 2021 10:03 PM
> To: Daniel Vetter <daniel@ffwll.ch>
> Cc: Xiong, Jianxin <jianxin.xiong@intel.com>; Jason Gunthorpe <jgg@ziepe.ca>; Gal Pressman <galpress@amazon.com>; Yishai Hadas
> <yishaih@nvidia.com>; linux-rdma <linux-rdma@vger.kernel.org>; Edward Srouji <edwards@nvidia.com>; dri-devel <dri-
> devel@lists.freedesktop.org>; Christian Koenig <christian.koenig@amd.com>; Doug Ledford <dledford@redhat.com>; Vetter, Daniel
> <daniel.vetter@intel.com>
> Subject: Re: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support
> 

<...>

> > > > > > > > +#include <drm/drm.h>
> > > > > > > > +#include <drm/i915_drm.h> #include <drm/amdgpu_drm.h>
> > > > > > > > +#include <drm/radeon_drm.h>
> > > > > > >
> > > > > > > I assume these should come from the kernel headers package, right?
> > > > > >
> > > > > > This is gross, all kernel headers should be placed in
> > > > > > kernel-headers/* and "update" script needs to be extended to take drm/* files too :(.
> > > > >
> > > > > drm kernel headers are in the libdrm package. You need that
> > > > > anyway for doing the ioctls (if you don't hand-roll the restarting yourself).
> > > > >
> > > > > Also our userspace has gone over to just outright copying the
> > > > > driver headers. Not the generic headers, but for the rendering
> > > > > side of gpus, which is the topic here, there's really not much generic stuff.
> > > > >
> > > > > > Jianxin, are you fixing it?
> > > > >
> > > > > So fix is either to depend upon libdrm for building, or have
> > > > > copies of the headers included in the package for the
> > > > > i915/amdgpu/radeon headers (drm/drm.h probably not so good idea).
> > > >
> > > > We should have a cmake test to not build the drm parts if it can't be built, and pyverbs should skip the tests.
> > > >
> > >
> > > Yes, I will add a test for that. Also, on SLES, the headers could be under /usr/include/libdrm instead of /usr/include/drm. The make test
> should check that and use proper path.
> >
> > Please use pkgconfig for this, libdrm installs a .pc file to make sure
> > you can find the right headers.
> 
> rdma-core uses cmake build system and in our case cmake find_library() is preferable over pkgconfig.

Only the headers are needed, and they could be installed via either the libdrm-devel package or the kernel-headers package. The cmake find_path() command is more suitable here.
 
> 
> Thanks
> 
> > -Daniel
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-02-03 17:00 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 19:56 [PATCH rdma-core v7 0/6] Add user space dma-buf support Jianxin Xiong
2021-01-25 19:56 ` Jianxin Xiong
2021-01-25 19:56 ` [PATCH rdma-core v7 1/6] Update kernel headers Jianxin Xiong
2021-01-25 19:56   ` Jianxin Xiong
2021-01-25 19:56 ` [PATCH rdma-core v7 2/6] verbs: Support dma-buf based memory region Jianxin Xiong
2021-01-25 19:56   ` Jianxin Xiong
2021-01-25 19:56 ` [PATCH rdma-core v7 3/6] mlx5: " Jianxin Xiong
2021-01-25 19:56   ` Jianxin Xiong
2021-01-25 19:57 ` [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support Jianxin Xiong
2021-01-25 19:57   ` Jianxin Xiong
2021-01-31 15:31   ` Gal Pressman
2021-01-31 15:31     ` Gal Pressman
2021-02-01  6:16     ` Leon Romanovsky
2021-02-01  6:16       ` Leon Romanovsky
2021-02-01 14:10       ` Daniel Vetter
2021-02-01 14:10         ` Daniel Vetter
2021-02-01 15:29         ` Jason Gunthorpe
2021-02-01 15:29           ` Jason Gunthorpe
2021-02-01 17:03           ` Xiong, Jianxin
2021-02-01 17:03             ` Xiong, Jianxin
2021-02-02 15:24             ` Daniel Vetter
2021-02-02 15:24               ` Daniel Vetter
2021-02-03  6:03               ` Leon Romanovsky
2021-02-03  6:03                 ` Leon Romanovsky
2021-02-03 16:57                 ` Xiong, Jianxin [this message]
2021-02-03 16:57                   ` Xiong, Jianxin
2021-02-03 17:53                   ` Daniel Vetter
2021-02-03 17:53                     ` Daniel Vetter
2021-02-03 17:56                     ` Jason Gunthorpe
2021-02-03 17:56                       ` Jason Gunthorpe
2021-02-03 17:58                     ` Xiong, Jianxin
2021-02-03 17:58                       ` Xiong, Jianxin
2021-02-03 18:14                       ` Emil Velikov
2021-02-03 18:14                         ` Emil Velikov
2021-01-25 19:57 ` [PATCH rdma-core v7 5/6] tests: Add tests for dma-buf based memory regions Jianxin Xiong
2021-01-25 19:57   ` Jianxin Xiong
2021-01-31  8:44   ` John Hubbard
2021-01-31  8:44     ` John Hubbard
2021-02-01 17:12     ` Xiong, Jianxin
2021-02-01 17:12       ` Xiong, Jianxin
2021-01-25 19:57 ` [PATCH rdma-core v7 6/6] tests: Bug fix for get_access_flags() Jianxin Xiong
2021-01-25 19:57   ` Jianxin Xiong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW3PR11MB455563A3F337F789613A9940E5B49@MW3PR11MB4555.namprd11.prod.outlook.com \
    --to=jianxin.xiong@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dledford@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edwards@nvidia.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.