DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Neil Horman <nhorman@tuxdriver.com>
Cc: dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>,
	 Andrew Rybchenko <arybchenko@solarflare.com>,
	Ray Kinsella <mdr@ashroe.eu>,
	 John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	 Qiming Yang <qiming.yang@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	 Nicolas Chautru <nicolas.chautru@intel.com>,
	Declan Doherty <declan.doherty@intel.com>,
	 Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	 Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] mark experimental variables
Date: Thu, 9 Jan 2020 17:49:28 +0100	[thread overview]
Message-ID: <CAJFAV8wo769hxFj9a92bnEiguS+XxzoMu=Q-Au3yfEKHQOHXrw@mail.gmail.com> (raw)
In-Reply-To: <4177191.8F6SAcFxjW@xps>

On Thu, Jan 9, 2020 at 3:13 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 02/12/2019 16:20, David Marchand:
> > So far, we did not pay attention to direct access to variables but they
> > are part of the API/ABI too and should be clearly identified.
> >
> > Introduce a __rte_experimental_var tag and mark existing exported
> > variables.
> >
> > Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > +     elif grep -qe "\(\.data\|\*COM\*\).*[[:space:]]$SYM$" $DUMPFILE &&
> > +             ! grep -q "\.data\.experimental.*[[:space:]]$SYM$" $DUMPFILE
>
> I like such regex ;)

Err.. thanks?


> I don't know COM section but I am not an ELF expert.

I am no ELF expert either.

IIUC, this section is a special one used when generating object files
for common symbols but the compiler is not sure where the actual
symbol should go.
It is then resolved as .data or .bss when linking.


> Maybe you can just add a comment in the commit log about searching
> the symbol in .data and COM sections, even if we don't know exactly why.

Actually, this is a good thing you asked about it.
I did a new check before/after the series.

Example for rte_net_ice_dynflag_proto_xtr_vlan_mask.

Before:
/home/dmarchan/builds/build-gcc-shared/drivers/a715181@@tmp_rte_pmd_ice@sta/net_ice_ice_rxtx.c.o
0000000000000008       O *COM*    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/a715181@@tmp_rte_pmd_ice@sta/net_ice_ice_ethdev.c.o
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/libtmp_rte_pmd_ice.a
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
0000000000000008       O *COM*    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/librte_pmd_ice.a
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
0000000000000008       O *COM*    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/librte_pmd_ice.so.20.0.1
0000000000063890 g     O .bss    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask

After:
/home/dmarchan/builds/build-gcc-shared/drivers/a715181@@tmp_rte_pmd_ice@sta/net_ice_ice_rxtx.c.o
0000000000000020 g     O .data.experimental    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/a715181@@tmp_rte_pmd_ice@sta/net_ice_ice_ethdev.c.o
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/libtmp_rte_pmd_ice.a
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
0000000000000020 g     O .data.experimental    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/librte_pmd_ice.a
0000000000000000         *UND*    0000000000000000
rte_net_ice_dynflag_proto_xtr_vlan_mask
0000000000000020 g     O .data.experimental    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask
/home/dmarchan/builds/build-gcc-shared/drivers/librte_pmd_ice.so.20.0.1
00000000000604f0 g     O .data    0000000000000008
rte_net_ice_dynflag_proto_xtr_vlan_mask

The thing that scares me is that the final symbol gets moved from .bss
to .data in the .so.


Neil?


--
David Marchand


  reply	other threads:[~2020-01-09 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 16:13 [dpdk-dev] [RFC PATCH] " David Marchand
2019-11-26  9:25 ` Ray Kinsella
2019-11-26  9:50   ` David Marchand
2019-11-26 14:15   ` Neil Horman
2019-11-26 14:22 ` Neil Horman
2019-11-27 20:45   ` David Marchand
2019-11-29 11:43     ` Neil Horman
2019-11-29 12:03       ` David Marchand
2019-12-02 15:20 ` [dpdk-dev] [PATCH] " David Marchand
2019-12-03  8:33   ` Andrew Rybchenko
2019-12-03 15:26   ` Neil Horman
2020-01-09 14:13   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2020-01-09 16:49     ` David Marchand [this message]
2023-06-12  2:49 ` [dpdk-dev] [RFC PATCH] " Stephen Hemminger

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='CAJFAV8wo769hxFj9a92bnEiguS+XxzoMu=Q-Au3yfEKHQOHXrw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=arybchenko@solarflare.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=nicolas.chautru@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    /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).