From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Jason Gunthorpe'
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: 'Leon Romanovsky' <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
'Doug Ledford' <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: rdma-core build environment enabling out-of-core providers
Date: Wed, 2 Aug 2017 14:16:09 -0500 [thread overview]
Message-ID: <019001d30bc3$cc6648e0$6532daa0$@opengridcomputing.com> (raw)
In-Reply-To: <20170802160900.GB21208-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> > Currently there is no way to build an out-of-rdma-core provider on a
> > system installed with rdma-core. It would be useful to have
> > rdma-core install the needed headers and libs (ie the ccan stuff) as
> > part of its install. This would be similar to previous releases of
> > libibverbs that included the headers needed for providers to build.
> > I would like to implement this for rdma-core, but wanted feedback on
> > this approach. Maybe an rdma-core-devel type package? I guess I'm
> > thinking this would be analogous to building out-of-kernel modules,
> > which is available for kernel developers.
>
> I don't think that really works. eg the util/mmio.h relies on
> stdatomic.h to work, which means it relies on the cmake shim to
> provide stdatomic.h on old systems. Other private headers may be similar
> in their integration with cmake/etc.
>
> You can't really publish those headers sanely, and part of the point
> here was specifically to allow using things like statomic.h properly
> without having to be concerned about how to install the shim into a
> public header.
>
> In my view, the best approach, which I have suggested before, is to
> build the out-of-tree stuff 'in-tree' and discard everything except
> the single provider library you are building for. For instance, a rpm
> spec file that produces as contents a single provider shlib.
>
> This seems like the least amount of work for everyone, and it doesn't
> really matter, I think, that the 'source' for the 'provider' carries
> lots of unbuilt stuff.
>
> Perhaps the best way to accomplish that is to add a sample rpm spec
> file to Documentation/ or something that shows how to do that. If you
> want to take a first stab at it I can give you some help.
Hey Jason, Thanks for this detailed response! I appreciate it.
Today I did two experiments:
1) I took my out-of-tree provider, and moved it into rdma-core, updated it to
use the rdma-core bldenv and APIs. This included the rdma-core mmio and
dma/cache services, plus a few other nits like ccan, and the new byte swapping
API, and got it building. That was pretty straight forward.
2) I took the updated out-of-tree provider src from 1), and put it back in the
out-of-tree provider automake/config bldenv, and then tried to pull in whatever
was needed from rdma-core to build it. This resulted in me pulling certain
files, like you mentioned above. I just pulled them from the rdma-core/build/
tree for the sake of getting it to build. Basically I needed ccan/*
infiniband/driver.h, and util/compiler.h/udma_barrier.h. That got it to build.
I haven't tested either of these yet to see if they actually load. But that's
where I'm at. #2 has the issues you describe, in that the atomic header is
auto-generated based on the installed distro/platform. So that leads to using
#1 which is what you recommend. I'm ok with using #1, but then the issue
becomes supporting my provider across older non rdma-core installed systems.
Ideally, I want to be able to build my provider to install into a RHEL7.x
system, for example, which uses the older libibverbs. But I also want it to
build/install into a system installed with OFED-4.8 which includes rdma-core-14
I think, as well as SLE12SP3 which has rdma-core as part of its distribution as
well.
I guess the issue is how to use 1) but allow a build/install into an older
libibverbs system. I don't think it is possible w/o a hybrid bldenv that uses
rdma-core bldenv if that is what is installed, or the old libibverbs
headers/APIs if that is installed.
And I'm trying to do this cleanly :) (backporting is rarely clean)
Thanks,
Steve
--
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
next prev parent reply other threads:[~2017-08-02 19:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 13:55 rdma-core build environment enabling out-of-core providers Steve Wise
2017-08-02 16:09 ` Jason Gunthorpe
[not found] ` <20170802160900.GB21208-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-02 19:16 ` Steve Wise [this message]
2017-08-02 19:34 ` Jason Gunthorpe
[not found] ` <20170802193403.GA23777-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-02 20:05 ` Steve Wise
2017-08-02 20:23 ` Jason Gunthorpe
[not found] ` <20170802202300.GA24244-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-03 5:26 ` Leon Romanovsky
2017-08-03 7:08 ` Nicolas Morey-Chaisemartin
[not found] ` <44b511c6-45fa-d5aa-4d4c-e47d2edcf604-l3A5Bk7waGM@public.gmane.org>
2017-08-03 13:48 ` Steve Wise
2017-08-03 14:47 ` Jason Gunthorpe
[not found] ` <20170803144733.GA13127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-03 15:01 ` Nicolas Morey-Chaisemartin
[not found] ` <890f961c-7aa8-1a73-e98d-f7ce9da333d7-l3A5Bk7waGM@public.gmane.org>
2017-08-03 17:07 ` Jason Gunthorpe
[not found] ` <20170803170713.GD13127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-04 6:02 ` Nicolas Morey-Chaisemartin
[not found] ` <7cc0ba31-7a05-4db1-5807-4d971fc3d773-l3A5Bk7waGM@public.gmane.org>
2017-08-04 11:30 ` Steve Wise
2017-08-04 11:52 ` Nicolas Morey-Chaisemartin
[not found] ` <188beb70-9776-33fc-6f72-cc00e968db73-l3A5Bk7waGM@public.gmane.org>
2017-08-04 13:14 ` Steve Wise
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='019001d30bc3$cc6648e0$6532daa0$@opengridcomputing.com' \
--to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 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.