From: Bruce Richardson <bruce.richardson@intel.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Stephen Hemminger <stephen@networkplumber.org>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
Ray Kinsella <mdr@ashroe.eu>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] ABI and inline functions
Date: Wed, 24 Apr 2019 09:49:55 +0100 [thread overview]
Message-ID: <20190424084954.GA1871@bricha3-MOBL.ger.corp.intel.com> (raw)
Message-ID: <20190424084955.1Y8ePeN9zWxVEzv19TSz1Z0FG-7WOvElKODyTbSN9vk@z> (raw)
In-Reply-To: <VE1PR08MB51496A2D546E1B464CC537B7983C0@VE1PR08MB5149.eurprd08.prod.outlook.com>
On Wed, Apr 24, 2019 at 05:08:46AM +0000, Honnappa Nagarahalli wrote:
> > > > On Wed, Apr 17, 2019 at 05:12:43AM +0000, Honnappa Nagarahalli
> > wrote:
> > > > > Hello,
<snip>
> > > >
> > > > 2. If the situation is as in #1, but the structures in question are
> > > > passed to non-inline DPDK functions. In this case, any changes to
> > > > the structures require those functions taking the structures to be
> > > > versioned for old and new structures
> > > I think this can get complicated on the inline function side. The application
> > and the DPDK library will end up having different inline functions. The
> > changed inline function needs to be aware of 2 structure formats or the inline
> > function needs to be duplicated (one for each version of the structure). I
> > guess these are the workarounds we have to do.
> > >
> > No, there is never any need for two versions of the inline functions, only the
> > newest version is needed. This is because in the case of a newly compiled
> > application only the newest version of the non-inline functions is ever used.
> > The other older versions are only used at runtime for compatilibity with pre-
> > compiled apps with the older inlines.
> >
> Since the inline function is used in the application and the DPDK (say a library), we have 2 copies of the same inline function in the final binary (1 with the application and 2nd one behind DPDK non-inline functions). When the DPDK non-inline functions are versioned, the older version of the functions have to support the old structures for the old application to work with the new DPDK. i.e. both copies of the inline function have to be the same.
>
Ok, if the inline function is used both in DPDK libs and apps, then indeed
we have a slightly more complex problem. I was mostly assuming the inlines
were for app use only, but you are right that we have internally used ones
also. However, I expect this only makes the problem a little harder rather
than impossible - we would need two versions of the inline function,
however, only one needs to be exposed publically.
Really, the main upshot is that we need to reduce use of inline functions
except where absolutely necessary, and then hide structures as much as
possible. I don't see anyone disagreeing with that goal. :-)
/Bruce
next prev parent reply other threads:[~2019-04-24 8:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 5:12 Honnappa Nagarahalli
2019-04-17 5:12 ` Honnappa Nagarahalli
2019-04-17 8:36 ` Bruce Richardson
2019-04-17 8:36 ` Bruce Richardson
2019-04-17 16:52 ` Stephen Hemminger
2019-04-17 16:52 ` Stephen Hemminger
2019-04-17 17:46 ` Jerin Jacob Kollanukkaran
2019-04-17 17:46 ` Jerin Jacob Kollanukkaran
2019-04-17 18:51 ` Stephen Hemminger
2019-04-17 18:51 ` Stephen Hemminger
2019-04-18 5:56 ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-04-18 5:56 ` Jerin Jacob Kollanukkaran
2019-04-23 14:23 ` Ray Kinsella
2019-04-23 14:23 ` Ray Kinsella
2019-04-24 18:38 ` Jerin Jacob Kollanukkaran
2019-04-24 18:38 ` Jerin Jacob Kollanukkaran
2019-04-23 14:19 ` [dpdk-dev] " Ray Kinsella
2019-04-23 14:19 ` Ray Kinsella
2019-04-18 4:34 ` Honnappa Nagarahalli
2019-04-18 4:34 ` Honnappa Nagarahalli
2019-04-18 10:28 ` Bruce Richardson
2019-04-18 10:28 ` Bruce Richardson
2019-04-23 14:12 ` Ray Kinsella
2019-04-23 14:12 ` Ray Kinsella
2019-04-24 5:15 ` Honnappa Nagarahalli
2019-04-24 5:15 ` Honnappa Nagarahalli
2019-04-24 11:08 ` Burakov, Anatoly
2019-04-24 11:08 ` Burakov, Anatoly
2019-04-24 12:22 ` Ray Kinsella
2019-04-24 12:22 ` Ray Kinsella
2019-04-24 12:54 ` Burakov, Anatoly
2019-04-24 12:54 ` Burakov, Anatoly
2019-04-24 15:44 ` Stephen Hemminger
2019-04-24 15:44 ` Stephen Hemminger
2019-04-30 8:52 ` Thomas Monjalon
2019-04-30 8:52 ` Thomas Monjalon
2019-04-24 5:08 ` Honnappa Nagarahalli
2019-04-24 5:08 ` Honnappa Nagarahalli
2019-04-24 8:49 ` Bruce Richardson [this message]
2019-04-24 8:49 ` Bruce Richardson
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=20190424084954.GA1871@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=mdr@ashroe.eu \
--cc=nd@arm.com \
--cc=stephen@networkplumber.org \
--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).