DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
	Fady Bader <fady@mellanox.com>,
	dev@dpdk.org, Omar Cardona <ocardona@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	Ranjit Menon <ranjit.menon@intel.com>,
	dmitry.kozliuk@gmail.com, mdr@ashroe.eu
Subject: Re: [dpdk-dev] ABI versioning in Windows
Date: Wed, 27 May 2020 20:21:08 -0400	[thread overview]
Message-ID: <20200528002108.GA1666585@hmswarspite.think-freely.org> (raw)
In-Reply-To: <3834007.4YYSKOMRdh@thomas>

On Wed, May 27, 2020 at 11:27:12PM +0200, Thomas Monjalon wrote:
> 27/05/2020 22:35, Neil Horman:
> > On Wed, May 27, 2020 at 02:50:07PM +0200, Thomas Monjalon wrote:
> > > +Cc more people
> > > 
> > > 27/05/2020 12:41, Fady Bader:
> > > > What should we do with the ABI versioning in Windows ?
> > > 
> > > I think there are 2 questions here:
> > > 
> > > 1/ Do we want to maintain ABI compatibility on Windows like we do for Linux and FreeBSD?
> > > The decision must be clearly documented.
> > > 
> > My first notion, without any greater thought is "why wouldn't we".  ABI
> > stability is OS agnostic.  If a symbol is considered stable, theres no reason
> > that I can think of that it wouldn't be stable for each OS.
> 
> Technical reason + no need so far.
> 
I'm not sure what you mean by technical reason.  As for need, I'd be careful of
that.  We already have the infrastructure, so if symbol versioning can be
implemented, we should.  We should only rip it out for windows if the
compiler/linker/loader doesn't support symbol versioning.  And I honestly don't
have a definitive answer on that

> 
> > > 2/ How do we implement the macros in rte_function_versioning.h for Windows?
> > > Something needs to be done, otherwise we cannot compile libraries having some function versioning.
> > > 
> > Can you elaborate on what exactly the issue is here?  I presume by your comment
> > above that visual studio either doesn't support symbol level versioning or
> > doesn't support versioning at all?
> 
> I don't know how to implement the macros in rte_function_versioning.h for Windows.
> 
Thats a question beyond my skill, especially given that I don't have a windows
compiler available

> 
> > If thats the case, and there is a commitment to make dpdk buildable on windows,
> > I suppose the only choice is to make a ifdef WINDOWS section of the
> > rte_function_versioning.h file, and effectively turn all the macros into no-ops.
> 
> Yes that's the idea.
> But we still need to implement either BIND_DEFAULT_SYMBOL or MAP_STATIC_SYMBOL
> to alias the latest function version to the actual function symbol.
> 
You can use alternate names, which is equivalent to clang/gccs
__attribute__((alias)):
https://stackoverflow.com/questions/53381461/does-visual-c-provide-a-language-construct-with-the-same-functionality-as-a

> > The BIND_DEFAULT_SYMBOL macro looks like it could still work, as MSVC has an
> > alias linker command thats implementable via __pragma, but thats probably all we
> > can do, unless there is some more robust versioning support that I can't find.
> 
> What is this pragma?
> 
See the link above

> 
> > Note we will also likely need to agument the makefiles/meson files so that the
> > link stage doesn't pass the version script to the linker
> 
> Why not using the version script for exported symbols?
> We are already doing it (.def file generated from .map).
> 
Well, if msvc doesn't support symbol versioning, I expect their linker won't
accept a linker version script, or are you using another compiler?
Neil

> 
> 

      parent reply	other threads:[~2020-05-28  0:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 10:41 Fady Bader
2020-05-27 12:50 ` Thomas Monjalon
2020-05-27 14:32   ` Ray Kinsella
2020-05-27 20:35   ` Neil Horman
2020-05-27 21:27     ` Thomas Monjalon
2020-05-27 21:43       ` Thomas Monjalon
2020-05-28  0:28         ` Neil Horman
2020-05-28  0:21       ` Neil Horman [this message]

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=20200528002108.GA1666585@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=mdr@ashroe.eu \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=thomas@monjalon.net \
    /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).