DPDK patches and discussions
 help / color / mirror / Atom feed
* Devtool test-meson-build.sh failed
@ 2023-02-23 22:58 Tanzeel Ahmed
  2023-02-23 23:48 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Tanzeel Ahmed @ 2023-02-23 22:58 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]

Hello, devs!
I hope you all are doing well!

I am currently working on a new patch version for "[PATCH v2] lib/net: add
MPLS insert and strip functionality". However, I am facing an error when
running the devtools/test-meson-build.sh script. The error is related to
unused functions in rte_mpls.h that is causing warnings to be treated as
errors, leading to the build failure. Following is the error snippet:










*[50/3060] Compiling C object lib/librte_net.a.p/net_rte_net.c.oFAILED:
lib/librte_net.a.p/net_rte_net.c.ogcc -Ilib/librte_net.a.p -Ilib
-I../../lib -Ilib/net -I../../lib/net -I. -I../.. -Iconfig -I../../config
-Ilib/eal/include -I../../lib/eal/include -Ilib/eal/linux/include
-I../../lib/eal/linux/include -Ilib/eal/x86/include
-I../../lib/eal/x86/include -Ilib/eal/common -I../../lib/eal/common
-Ilib/eal -I../../lib/eal -Ilib/kvargs -I../../lib/kvargs -Ilib/metrics
-I../../lib/metrics -Ilib/telemetry -I../../lib/telemetry -Ilib/mbuf
-I../../lib/mbuf -Ilib/mempool -I../../lib/mempool -Ilib/ring
-I../../lib/ring -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra
-Werror -O2 -g -include rte_config.h -Wcast-qual -Wdeprecated -Wformat
-Wformat-nonliteral -Wformat-security -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition
-Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings
-Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native
-DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API
-DCC_X86_64_SSE42_PCLMULQDQ_SUPPORT -DRTE_LOG_DEFAULT_LOGTYPE=lib.net
<http://lib.net> -MD -MQ lib/librte_net.a.p/net_rte_net.c.o -MF
lib/librte_net.a.p/net_rte_net.c.o.d -o lib/librte_net.a.p/net_rte_net.c.o
-c ../../lib/net/rte_net.cIn file included from
../../lib/net/rte_net.c:16:0:../../lib/net/rte_mpls.h:61:1: error:
‘rte_mpls_push_over_l2’ defined but not used
[-Werror=unused-function] rte_mpls_push_over_l2(struct rte_mbuf **m, const
struct rte_mpls_hdr *mp) ^cc1: all warnings being treated as
errors[99/3060] Compiling C object
lib/librte_vhost.a.p/vhost_virtio_net.c.oninja: build stopped: subcommand
failed.*

The same warning leads to the failure of the following checks:

*ci/github-robot: build*

*ci/iol-x86_64-unit-testing*
*ci/iol-x86_64-compile-testing*
and warning in the following check:
*ci/iol-testing*

Although I have added test cases under app/ in a new file called
test_mpls.c and adjusted its setting in meson.build, the problem is still
occurring.
As per my understanding, I need to use these new functions in
lib/net/rte_net to remove this warning, but I believe that the tests in the
app/ directory should be sufficient. Could you please suggest a workaround
to remove this warning?

I would greatly appreciate any guidance or assistance you can provide.

[-- Attachment #2: Type: text/html, Size: 4076 bytes --]

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

* Re: Devtool test-meson-build.sh failed
  2023-02-23 22:58 Devtool test-meson-build.sh failed Tanzeel Ahmed
@ 2023-02-23 23:48 ` Ferruh Yigit
  2023-02-24  9:23   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2023-02-23 23:48 UTC (permalink / raw)
  To: Tanzeel Ahmed, dev

On 2/23/2023 10:58 PM, Tanzeel Ahmed wrote:
> Hello, devs!
> I hope you all are doing well!
> 
> I am currently working on a new patch version for "[PATCH v2] lib/net:
> add MPLS insert and strip functionality". However, I am facing an error
> when running the devtools/test-meson-build.sh script. The error is
> related to unused functions in rte_mpls.h that is causing warnings to be
> treated as errors, leading to the build failure. Following is the error
> snippet:
> 
> *[50/3060] Compiling C object lib/librte_net.a.p/net_rte_net.c.o
> FAILED: lib/librte_net.a.p/net_rte_net.c.o
> gcc -Ilib/librte_net.a.p -Ilib -I../../lib -Ilib/net -I../../lib/net -I.
> -I../.. -Iconfig -I../../config -Ilib/eal/include
> -I../../lib/eal/include -Ilib/eal/linux/include
> -I../../lib/eal/linux/include -Ilib/eal/x86/include
> -I../../lib/eal/x86/include -Ilib/eal/common -I../../lib/eal/common
> -Ilib/eal -I../../lib/eal -Ilib/kvargs -I../../lib/kvargs -Ilib/metrics
> -I../../lib/metrics -Ilib/telemetry -I../../lib/telemetry -Ilib/mbuf
> -I../../lib/mbuf -Ilib/mempool -I../../lib/mempool -Ilib/ring
> -I../../lib/ring -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wextra -Werror -O2 -g -include rte_config.h -Wcast-qual -Wdeprecated
> -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations
> -Wmissing-prototypes -Wnested-externs -Wold-style-definition
> -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
> -Wwrite-strings -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC
> -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API
> -DCC_X86_64_SSE42_PCLMULQDQ_SUPPORT -DRTE_LOG_DEFAULT_LOGTYPE=lib.net
> <http://lib.net> -MD -MQ lib/librte_net.a.p/net_rte_net.c.o -MF
> lib/librte_net.a.p/net_rte_net.c.o.d -o
> lib/librte_net.a.p/net_rte_net.c.o -c ../../lib/net/rte_net.c
> In file included from ../../lib/net/rte_net.c:16:0:
> ../../lib/net/rte_mpls.h:61:1: error: ‘rte_mpls_push_over_l2’ defined
> but not used [-Werror=unused-function]
>  rte_mpls_push_over_l2(struct rte_mbuf **m, const struct rte_mpls_hdr *mp)
>  ^
> cc1: all warnings being treated as errors
> [99/3060] Compiling C object lib/librte_vhost.a.p/vhost_virtio_net.c.o
> ninja: build stopped: subcommand failed.

Can it be because 'rte_mpls_push_over_l2()' is defined in 'rte_mpls.h'
but it is not inline? (just a guess).

If so, you should create a 'rte_mpls.c' file, implement function there
and expose it in 'version.map' (as experimental).


*
> *
> *
> The same warning leads to the failure of the following checks:
> *ci/github-robot: build
> *
> *ci/iol-x86_64-unit-testing
> *
> *ci/iol-x86_64-compile-testing*
> and warning in the following check:
> *ci/iol-testing*
> 
> Although I have added test cases under app/ in a new file called
> test_mpls.c and adjusted its setting in meson.build, the problem is
> still occurring.
> As per my understanding, I need to use these new functions in
> lib/net/rte_net to remove this warning, but I believe that the tests in
> the app/ directory should be sufficient. Could you please suggest a
> workaround to remove this warning?
> 
> I would greatly appreciate any guidance or assistance you can provide.
> 


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

* Re: Devtool test-meson-build.sh failed
  2023-02-23 23:48 ` Ferruh Yigit
@ 2023-02-24  9:23   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2023-02-24  9:23 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Tanzeel Ahmed, dev

On Thu, Feb 23, 2023 at 11:48:47PM +0000, Ferruh Yigit wrote:
> On 2/23/2023 10:58 PM, Tanzeel Ahmed wrote:
> > Hello, devs!
> > I hope you all are doing well!
> > 
> > I am currently working on a new patch version for "[PATCH v2] lib/net:
> > add MPLS insert and strip functionality". However, I am facing an error
> > when running the devtools/test-meson-build.sh script. The error is
> > related to unused functions in rte_mpls.h that is causing warnings to be
> > treated as errors, leading to the build failure. Following is the error
> > snippet:
> > 
> > *[50/3060] Compiling C object lib/librte_net.a.p/net_rte_net.c.o
> > FAILED: lib/librte_net.a.p/net_rte_net.c.o
> > gcc -Ilib/librte_net.a.p -Ilib -I../../lib -Ilib/net -I../../lib/net -I.
> > -I../.. -Iconfig -I../../config -Ilib/eal/include
> > -I../../lib/eal/include -Ilib/eal/linux/include
> > -I../../lib/eal/linux/include -Ilib/eal/x86/include
> > -I../../lib/eal/x86/include -Ilib/eal/common -I../../lib/eal/common
> > -Ilib/eal -I../../lib/eal -Ilib/kvargs -I../../lib/kvargs -Ilib/metrics
> > -I../../lib/metrics -Ilib/telemetry -I../../lib/telemetry -Ilib/mbuf
> > -I../../lib/mbuf -Ilib/mempool -I../../lib/mempool -Ilib/ring
> > -I../../lib/ring -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> > -Wextra -Werror -O2 -g -include rte_config.h -Wcast-qual -Wdeprecated
> > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations
> > -Wmissing-prototypes -Wnested-externs -Wold-style-definition
> > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
> > -Wwrite-strings -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC
> > -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API
> > -DCC_X86_64_SSE42_PCLMULQDQ_SUPPORT -DRTE_LOG_DEFAULT_LOGTYPE=lib.net
> > <http://lib.net> -MD -MQ lib/librte_net.a.p/net_rte_net.c.o -MF
> > lib/librte_net.a.p/net_rte_net.c.o.d -o
> > lib/librte_net.a.p/net_rte_net.c.o -c ../../lib/net/rte_net.c
> > In file included from ../../lib/net/rte_net.c:16:0:
> > ../../lib/net/rte_mpls.h:61:1: error: ‘rte_mpls_push_over_l2’ defined
> > but not used [-Werror=unused-function]
> >  rte_mpls_push_over_l2(struct rte_mbuf **m, const struct rte_mpls_hdr *mp)
> >  ^
> > cc1: all warnings being treated as errors
> > [99/3060] Compiling C object lib/librte_vhost.a.p/vhost_virtio_net.c.o
> > ninja: build stopped: subcommand failed.
> 
> Can it be because 'rte_mpls_push_over_l2()' is defined in 'rte_mpls.h'
> but it is not inline? (just a guess).
> 
I believe this to be the cause. Static functions in a compilation unit must
be used or else you get a warning. This does not apply to static inline
functions, therefore all functions in headers must be static and inline to
avoid compiler warnings.

/Bruce

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

end of thread, other threads:[~2023-02-24  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 22:58 Devtool test-meson-build.sh failed Tanzeel Ahmed
2023-02-23 23:48 ` Ferruh Yigit
2023-02-24  9:23   ` Bruce Richardson

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).