Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480923

Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller

From Leon Romanovsky <leon@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller
Date 2016-09-12 07:10 +0200
Message-ID <sgrFf-7pF-3@gated-at.bofh.it> (permalink)
References (5 earlier) <sgd9g-6Ig-19@gated-at.bofh.it> <sge5j-7ng-5@gated-at.bofh.it> <sggA9-xs-5@gated-at.bofh.it> <sggJQ-AW-25@gated-at.bofh.it> <sghcS-Kv-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sun, Sep 11, 2016 at 11:52:35AM -0600, Jason Gunthorpe wrote:
> On Sun, Sep 11, 2016 at 07:24:45PM +0200, Christoph Hellwig wrote:
> > > > > I've posted some initial work toward a) a while ago, and once we
> > >
> > > Did it get merged? Do you have a pointer?
> >
> > http://www.spinics.net/lists/linux-rdma/msg31958.html
>
> Right, I remember that. Certainly the right direction
>
> > > However, everything under verbs is not straightforward. The files in
> > > userspace are not copies...
> > >
> > > user:
> > >
> > > struct ibv_query_device {
> > >        __u32 command;
> > >        __u16 in_words;
> > >        __u16 out_words;
> > >        __u64 response;
> > >        __u64 driver_data[0];
> > > };
> > >
> > > kernel:
> > >
> > > struct ib_uverbs_query_device {
> > >         __u64 response;
> > >         __u64 driver_data[0];
> > > };
> >
> > We'll obviously need different strutures for the libibvers API
> > and the kernel interface in this case, and we'll need to figure out
> > how to properly translate them.  I think a cast, plus compile time
> > type checking ala BUILD_BUG_ON is the way to go.
>
> I'm not sure I follow, which would I cast?
>
> BUILD_BUG_ON(sizeof(ibv_query_device) == sizeof(ib_uverbs_cmd_hdr) +
>              sizeof(ib_uverbs_query_device))
>
> ?
>
> > > I'm thinking the best way forward might be to use a script and
> > > transform userspace into:
> > >
> > > struct ibv_query_device {
> > > 	struct ib_uverbs_cmd_hdr hdr;
> > > 	struct ib_uverbs_query_device cmd;
> > > };
> >
> > That would break the users of the interface.
>
> Sorry, I mean doing this inside rdma-plumbing. Since the change is ABI
> identical the modified libibverbs would still be binary compatible
> with all providers but not source compatible. Since all kernel
> supported providers are in rdma-plumbing we can add the '.cmd.' at the
> same time.
>
> The kernel uapi header would stay the same.
>
> > However automatically generating the user ABI from the kernel one
> > might still be a good idea in the long run.
>
> My preference would be to try and use the kernel headers directly.

I thought the same, especially after realizing that they are almost
copy/paste from the vendor *-abi.h files.

>
> Jason

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Christoph Hellwig <hch@lst.de> - 2016-09-10 18:20 +0200
  Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-10 19:10 +0200
    Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Christoph Hellwig <hch@lst.de> - 2016-09-11 15:40 +0200
      Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@kernel.org> - 2016-09-11 16:40 +0200
        Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-11 19:20 +0200
          Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Christoph Hellwig <hch@lst.de> - 2016-09-11 19:30 +0200
            Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-11 20:00 +0200
              Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@kernel.org> - 2016-09-12 07:10 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-09-14 09:10 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-09-14 11:30 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@kernel.org> - 2016-09-15 21:00 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-09-21 06:50 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Tejun Heo <tj@kernel.org> - 2016-09-21 16:30 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-09-21 18:10 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller "Dalessandro, Dennis" <dennis.dalessandro@intel.com> - 2016-09-19 15:30 +0200
                Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-09-19 19:10 +0200

csiph-web