linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Adit Ranadive <aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Amrani,
	Ram" <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>,
	Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: New providers in rdma-core
Date: Wed, 19 Oct 2016 14:09:12 -0600	[thread overview]
Message-ID: <20161019200911.GA2666@obsidianresearch.com> (raw)
In-Reply-To: <12243e3b-87cf-2bd4-d097-1dd0a7907f41-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>

On Wed, Oct 19, 2016 at 12:51:02PM -0700, Adit Ranadive wrote:

> I see that rxe still has a rxe-abi header in the providers/rxe folder.
> Would that also move to the kernel as part of the conversion?

Ideally, but it is blocked by this:

> One of the things I'm unclear about what happends to the IBV structs
> included in the user-level ABI headers, for example, the ibv_get_context_resp
> here:
> https://github.com/linux-rdma/rdma-core/blob/master/providers/mlx4/mlx4-abi.h#L48

This is the main thing preventing the use of the uapi headers - they
are actually *different* :(

It would be great if you have have some ideas on how to deal with
that.. This hasn't been tackled yet.

One choice is to write this:

struct mlx4_alloc_ucontext_resp_v3 {
	struct ibv_get_context_resp	ibv_resp;
	__u32				qp_tab_size;
	__u16				bf_reg_size;
	__u16				bf_regs_per_page;
};

as:

struct user_mlx4_alloc_ucontext_resp_v3 {
	struct ibv_get_context_resp	ibv_resp;
	struct mlx4_alloc_ucontext_resp_v3 udata;
};

Perhaps aided by a macro so we get high uniformity:

#define DECLARE_DRIVER_UDATA(struct_driver, struct_common)
  struct user # struct_driver {
     struct struct_common ibv_resp;
     struct struct_driver udata;
  };

Where mlx4_alloc_ucontext_resp_v3 comes from the uapi header, and is
not inlined, so each driver gets an 'abi wrapper' header that just
builds all these structs.

I'd probably advocate for that for new drivers if nothing more clever
comes forward. At least it is a step closer..

Another approach might be a different way to marshal the kernel call..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-10-19 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 16:18 New providers in rdma-core Leon Romanovsky
     [not found] ` <CALq1K=+nEP0jFOCxj30HA0+bg0L1bF5+xiBcAC2bRwUz+M6+eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-19 16:39   ` Christoph Hellwig
     [not found]     ` <20161019163913.GA30843-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-19 17:13       ` Jason Gunthorpe
2016-10-19 17:28       ` Adit Ranadive
     [not found]         ` <6b57d79c-dbd3-cd9b-061e-27a3d3968845-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-10-19 17:59           ` Jason Gunthorpe
     [not found]             ` <20161019175926.GD29879-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-19 19:51               ` Adit Ranadive
     [not found]                 ` <12243e3b-87cf-2bd4-d097-1dd0a7907f41-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-10-19 20:09                   ` Jason Gunthorpe [this message]
     [not found]                     ` <20161019200911.GA2666-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-20  9:24                       ` Amrani, Ram
     [not found]                         ` <SN1PR07MB2207D6CF5ADA67FCFCAA3A2EF8D50-mikhvbZlbf8TSoR2DauN2+FPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-10-20 16:35                           ` Jason Gunthorpe
2016-10-25  5:42   ` oulijun
     [not found]     ` <580EF0D4.9050209-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-10-25  6:08       ` Leon Romanovsky

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=20161019200911.GA2666@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
    --cc=aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).