From: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mukesh Kacker
<mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH libibverbs 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
Date: Sat, 03 Sep 2016 09:30:40 +0200 [thread overview]
Message-ID: <1472887840.9410.364.camel@oracle.com> (raw)
In-Reply-To: <1472802582.3975.16.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
On Fri, 2016-09-02 at 09:49 +0200, Knut Omang wrote:
> On Thu, 2016-09-01 at 20:06 -0600, Jason Gunthorpe wrote:
> > On Thu, Sep 01, 2016 at 08:23:40PM +0200, Knut Omang wrote:
> > >
> > > >
> > > > >
> > > > > >
> > > > > > On Thu, Sep 01, 2016 at 08:59:51AM +0200, Knut Omang wrote:
> > > > > > >
> > > > > > > +++ b/src/libibverbs.map
> > > > > > > @@ -64,6 +64,7 @@ IBVERBS_1.0 {
> > > > > > > ibv_cmd_post_recv;
> > > > > > > ibv_cmd_post_srq_recv;
> > > > > > > ibv_cmd_create_ah;
> > > > > > > + ibv_cmd_create_ah_ex;
> > >
> > > For this patch backward binary compatibility is actually preserved - a vendor library
> > > continues to work even without recompiling. I deliberately avoided making
> > > the ibv_cmd_create_ah function inline to ensure that. Loading libsif would of course
> > > break, but with a symbol error.
> > No, this patch is wrong, you added it to IBVERBS_1.0, that isn't
> > allowed.
> >
> > You need to do something like this:
> >
> > IBVERBS_1.3 {
> > global:
> > ibv_cmd_create_ah_ex;
>
> You are quite right - I'll fix the patch like you indicate, using either 1.2 or 1.3 depending on
> the conclusions on the other changes you mention below, Doug, let me know what value you want,
>
> Thanks,
> Knut
>
> > Why? RPM works by having provides like:
> >
> > libibverbs
> > libibverbs(x86-64)
> > libibverbs.so.1()(64bit)
> > libibverbs.so.1(IBVERBS_1.0)(64bit)
> > libibverbs.so.1(IBVERBS_1.1)(64bit)
> >
> > And when you create a client RPM package it strips off the function name
> > and uniques it to produce the Depends.
> >
> > In other words, once IBVERBS_1.x is shipped in a RPM that stanza in
> > the map file is set in stone. We can never add more symbols to that
> > stanza. We must start a new number.
> >
> > To be concrete, when your new provider links to
> > ibv_cmd_create_ah_ex@IBVERBS_1.0 rpm will create a dependency
> > libibverbs.so.1(IBVERBS_1.0). *However* every RPM provides that, so
> > the dependency logic in RPM stops working and will let a user install
> > your provider on a system it is not compatible with. When it is set
> > properly to ibv_cmd_create_ah_ex@IBVERBS_1.3 then RPM will only allow
> > the provider RPM to be installed on a system that has the upgraded
> > libibverbs1.
> >
> > Unfortunately this has been systematically screwed up by recent
> > patches (pay attention Matan and Yisahi), so our symbol versioning is
> > now unusable for RPM based distros.
> >
> > Debian does this differently and will not be affected. Actual linking
> > should be fine too, AFAIK it is just RPM that will break.
> >
> > Doug? Is it too late to fix this for the patches you accepted in 2016?
> > The answer to that depends entirely on how far the RPMs have got..
> >
> > The _cmd_ varients are not too bad, we could fix that in rdma-plumbing
> > in a way that lets us move forward sane sanely, but
> > ibv_query_device_ex@IBVERBS_1.0 should have been tagged _1.2
> >
> > The fix would be to introduce a
> > ibv_query_device_ex@IBVERBS_1.3 as the new default and continue to
> > provide ibv_query_device_ex@IBVERBS_1.0 for compat against the same
> > physical symbol. New links would then get functional rpm dependencies.
Looking more closely at this whole problem, I think for my patch,
the right solution is just to avoid adding a new function name and
instead provide a redefinition of the original symbol with a new version
using the __asm__(".symver ...) construct already nicely used for v.1.0
bw compatibility - just following the pattern already established.
That way old provider builds can continue to work seamlessly and binary compatible,
but when recompiling against the new version, the compiler enforces use of the
new definitions instead, implicitly enforcing cleanup, which is a good thing..
I think in principle this could have been done for
the other _ex functions as well, getting rid of the whole
multiple _ex structs stuff.
Knut
--
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:[~2016-09-03 7:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 6:59 [PATCH libibverbs 0/3] SIF related libibverbs patches Knut Omang
[not found] ` <1472713193-22397-1-git-send-email-knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-01 6:59 ` [PATCH libibverbs 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters Knut Omang
[not found] ` <1472713193-22397-2-git-send-email-knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-01 8:34 ` Yishai Hadas
[not found] ` <09e67035-0c8a-9b44-fa84-08413dd6ac46-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-01 9:53 ` Knut Omang
2016-09-05 11:53 ` Knut Omang
[not found] ` <1473076411.3975.87.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-05 14:05 ` Yishai Hadas
[not found] ` <50c8e0ab-f7f4-85b1-09f7-a930ad445ee0-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-05 14:55 ` Knut Omang
2016-09-01 16:49 ` Jason Gunthorpe
[not found] ` <20160901164939.GD6479-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-01 17:22 ` Knut Omang
[not found] ` <1472750558.9410.230.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-01 17:36 ` Jason Gunthorpe
2016-09-01 18:05 ` Jason Gunthorpe
[not found] ` <20160901180512.GB20098-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-01 18:23 ` Knut Omang
[not found] ` <1472754220.9410.236.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-02 2:06 ` Jason Gunthorpe
[not found] ` <20160902020642.GA30057-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-02 7:49 ` Knut Omang
[not found] ` <1472802582.3975.16.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-03 7:30 ` Knut Omang [this message]
[not found] ` <1472887840.9410.364.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-05 2:38 ` Jason Gunthorpe
[not found] ` <20160905023817.GD21542-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-05 4:56 ` Knut Omang
2016-09-01 6:59 ` [PATCH libibverbs 2/3] Add padding to get proper end alignment of ibv_reg_mr_resp Knut Omang
[not found] ` <1472713193-22397-3-git-send-email-knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-01 8:56 ` Yishai Hadas
[not found] ` <6ce4a2f9-64ee-29af-72e8-1c8844436a20-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-01 9:07 ` Knut Omang
2016-09-01 16:42 ` Jason Gunthorpe
[not found] ` <20160901164216.GB6479-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-01 17:17 ` Knut Omang
2016-09-01 6:59 ` [PATCH libibverbs 3/3] Provide remote XRC SRQ number in kernel post_send Knut Omang
[not found] ` <1472713193-22397-4-git-send-email-knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-01 9:00 ` Yishai Hadas
[not found] ` <67f23338-1a5c-5080-d346-8441afb47670-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-09-05 15:50 ` Knut Omang
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=1472887840.9410.364.camel@oracle.com \
--to=knut.omang-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=mukesh.kacker-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@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).