patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing
@ 2019-11-25  8:10 David Marchand
  2019-11-25  8:10 ` [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled David Marchand
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Marchand @ 2019-11-25  8:10 UTC (permalink / raw)
  To: dev; +Cc: thomas, arybchenko, stable, Neil Horman

The map-list-symbol.sh script displays the filename, section and symbol
names of map files.

Example:
$ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
    lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create

The experimental symbol check should only consider the symbol name.

Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/check-experimental-syms.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 145dd70ebf..abebb89f12 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -23,7 +23,7 @@ trap 'rm -f "$DUMPFILE"' EXIT
 objdump -t $OBJFILE >$DUMPFILE
 
 ret=0
-for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE`
+for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
 do
 	if grep -q "\.text.*$SYM$" $DUMPFILE &&
 		! grep -q "\.text\.experimental.*$SYM$" $DUMPFILE
-- 
2.23.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled
  2019-11-25  8:10 [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing David Marchand
@ 2019-11-25  8:10 ` David Marchand
  2019-11-25  8:28   ` Andrew Rybchenko
  2019-11-25  8:21 ` [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing Andrew Rybchenko
  2019-11-25 13:26 ` Neil Horman
  2 siblings, 1 reply; 7+ messages in thread
From: David Marchand @ 2019-11-25  8:10 UTC (permalink / raw)
  To: dev; +Cc: thomas, arybchenko, stable, Neil Horman

A compiler can reuse a variable name and prefix it when instrumenting
with coverage.

Example:
$ make defconfig T=x86_64-native-linux-gcc O=master
$ make EXTRA_CFLAGS='--coverage' O=master
[...]
    CC rte_flow.o
 rte_flow_dynf_metadata_offs is not flagged as experimental but is listed
 in version map
 Please add __rte_experimental to the definition of
 rte_flow_dynf_metadata_offs

$ objdump -t master/build/lib/librte_ethdev/rte_flow.o |grep _offs$
0000000000000000 l     F .text.startup	000000000000000a
  _GLOBAL__sub_I_65535_0_rte_flow_dynf_metadata_offs
0000000000000620 g     O .data	0000000000000004
  rte_flow_dynf_metadata_offs

Protect against this by adding a space character in the pattern.

Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
Cc: stable@dpdk.org

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/check-experimental-syms.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index abebb89f12..f3603e5bac 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -25,8 +25,8 @@ objdump -t $OBJFILE >$DUMPFILE
 ret=0
 for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
 do
-	if grep -q "\.text.*$SYM$" $DUMPFILE &&
-		! grep -q "\.text\.experimental.*$SYM$" $DUMPFILE
+	if grep -q "\.text.*[[:space:]]$SYM$" $DUMPFILE &&
+		! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE
 	then
 		cat >&2 <<- END_OF_MESSAGE
 		$SYM is not flagged as experimental
-- 
2.23.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing
  2019-11-25  8:10 [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing David Marchand
  2019-11-25  8:10 ` [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled David Marchand
@ 2019-11-25  8:21 ` Andrew Rybchenko
  2019-11-25 13:26 ` Neil Horman
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Rybchenko @ 2019-11-25  8:21 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: thomas, stable, Neil Horman

On 11/25/19 11:10 AM, David Marchand wrote:
> The map-list-symbol.sh script displays the filename, section and symbol
> names of map files.
>
> Example:
> $ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
>     lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
> lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create
>
> The experimental symbol check should only consider the symbol name.
>
> Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled
  2019-11-25  8:10 ` [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled David Marchand
@ 2019-11-25  8:28   ` Andrew Rybchenko
  2019-11-25 10:57     ` David Marchand
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Rybchenko @ 2019-11-25  8:28 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: thomas, stable, Neil Horman

On 11/25/19 11:10 AM, David Marchand wrote:
> A compiler can reuse a variable name and prefix it when instrumenting
> with coverage.
> 
> Example:
> $ make defconfig T=x86_64-native-linux-gcc O=master
> $ make EXTRA_CFLAGS='--coverage' O=master
> [...]
>     CC rte_flow.o
>  rte_flow_dynf_metadata_offs is not flagged as experimental but is listed
>  in version map
>  Please add __rte_experimental to the definition of
>  rte_flow_dynf_metadata_offs
> 
> $ objdump -t master/build/lib/librte_ethdev/rte_flow.o |grep _offs$
> 0000000000000000 l     F .text.startup	000000000000000a
>   _GLOBAL__sub_I_65535_0_rte_flow_dynf_metadata_offs
> 0000000000000620 g     O .data	0000000000000004
>   rte_flow_dynf_metadata_offs
> 
> Protect against this by adding a space character in the pattern.
> 
> Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
> Cc: stable@dpdk.org
> 
> Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

David,

thanks a lot, it solves build problem.

It does not solve experimental symbol inconsistency problem in
markup and map file, but it is a separate less critical
problem.

Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled
  2019-11-25  8:28   ` Andrew Rybchenko
@ 2019-11-25 10:57     ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2019-11-25 10:57 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Thomas Monjalon, dpdk stable, Neil Horman

On Mon, Nov 25, 2019 at 9:29 AM Andrew Rybchenko
<arybchenko@solarflare.com> wrote:
>
> On 11/25/19 11:10 AM, David Marchand wrote:
> > A compiler can reuse a variable name and prefix it when instrumenting
> > with coverage.
> >
> > Example:
> > $ make defconfig T=x86_64-native-linux-gcc O=master
> > $ make EXTRA_CFLAGS='--coverage' O=master
> > [...]
> >     CC rte_flow.o
> >  rte_flow_dynf_metadata_offs is not flagged as experimental but is listed
> >  in version map
> >  Please add __rte_experimental to the definition of
> >  rte_flow_dynf_metadata_offs
> >
> > $ objdump -t master/build/lib/librte_ethdev/rte_flow.o |grep _offs$
> > 0000000000000000 l     F .text.startup        000000000000000a
> >   _GLOBAL__sub_I_65535_0_rte_flow_dynf_metadata_offs
> > 0000000000000620 g     O .data        0000000000000004
> >   rte_flow_dynf_metadata_offs
> >
> > Protect against this by adding a space character in the pattern.
> >
> > Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> David,
>
> thanks a lot, it solves build problem.
>
> It does not solve experimental symbol inconsistency problem in
> markup and map file, but it is a separate less critical
> problem.

We have lived with this situation on experimental variables.
So yes, the priority is to fix compilation.

I will see if you can do/need something about the variables.


Thanks for the tests Andrew.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing
  2019-11-25  8:10 [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing David Marchand
  2019-11-25  8:10 ` [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled David Marchand
  2019-11-25  8:21 ` [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing Andrew Rybchenko
@ 2019-11-25 13:26 ` Neil Horman
  2019-11-26  8:10   ` David Marchand
  2 siblings, 1 reply; 7+ messages in thread
From: Neil Horman @ 2019-11-25 13:26 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, arybchenko, stable

On Mon, Nov 25, 2019 at 09:10:06AM +0100, David Marchand wrote:
> The map-list-symbol.sh script displays the filename, section and symbol
> names of map files.
> 
> Example:
> $ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
>     lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
> lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create
> 
> The experimental symbol check should only consider the symbol name.
> 
> Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  buildtools/check-experimental-syms.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
> index 145dd70ebf..abebb89f12 100755
> --- a/buildtools/check-experimental-syms.sh
> +++ b/buildtools/check-experimental-syms.sh
> @@ -23,7 +23,7 @@ trap 'rm -f "$DUMPFILE"' EXIT
>  objdump -t $OBJFILE >$DUMPFILE
>  
>  ret=0
> -for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE`
> +for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
>  do
>  	if grep -q "\.text.*$SYM$" $DUMPFILE &&
>  		! grep -q "\.text\.experimental.*$SYM$" $DUMPFILE
> -- 
> 2.23.0
> 
> 
Series
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing
  2019-11-25 13:26 ` Neil Horman
@ 2019-11-26  8:10   ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2019-11-26  8:10 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, Thomas Monjalon, Andrew Rybchenko, dpdk stable, Neil Horman

On Mon, Nov 25, 2019 at 2:26 PM Neil Horman <nhorman@tuxdriver.com> wrote:
>
> On Mon, Nov 25, 2019 at 09:10:06AM +0100, David Marchand wrote:
> > The map-list-symbol.sh script displays the filename, section and symbol
> > names of map files.
> >
> > Example:
> > $ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
> >     lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
> > lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create
> >
> > The experimental symbol check should only consider the symbol name.
> >
> > Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> On 11/25/19 11:10 AM, David Marchand wrote:
> The map-list-symbol.sh script displays the filename, section and symbol
> names of map files.
>
> Example:
> $ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
>     lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
> lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create
>
> The experimental symbol check should only consider the symbol name.
>
> Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>

> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Series applied.


--
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25  8:10 [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing David Marchand
2019-11-25  8:10 ` [dpdk-stable] [PATCH 2/2] buildtools: fix build with coverage enabled David Marchand
2019-11-25  8:28   ` Andrew Rybchenko
2019-11-25 10:57     ` David Marchand
2019-11-25  8:21 ` [dpdk-stable] [PATCH 1/2] buildtools: fix experimental symbols listing Andrew Rybchenko
2019-11-25 13:26 ` Neil Horman
2019-11-26  8:10   ` David Marchand

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox