DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ipsec-secgw: fix build error
@ 2021-11-03 10:51 Radu Nicolau
  2021-11-03 11:56 ` [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential " Radu Nicolau
  2021-11-03 11:58 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix " Thomas Monjalon
  0 siblings, 2 replies; 9+ messages in thread
From: Radu Nicolau @ 2021-11-03 10:51 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal
  Cc: dev, declan.doherty, hemant.agrawal, anoobj, stable

Move core_statistics definition out of header file.

Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 ++
 examples/ipsec-secgw/ipsec-secgw.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 5fcf424efe..ea8e3bcb87 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -291,6 +291,8 @@ adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,
 
 #if (STATS_INTERVAL > 0)
 
+struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+
 /* Print out statistics on packet distribution */
 static void
 print_stats_cb(__rte_unused void *param)
diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ipsec-secgw.h
index 96e22de45e..f9be303c28 100644
--- a/examples/ipsec-secgw/ipsec-secgw.h
+++ b/examples/ipsec-secgw/ipsec-secgw.h
@@ -93,7 +93,7 @@ struct ipsec_core_statistics {
 	uint64_t burst_rx;
 } __rte_cache_aligned;
 
-struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+extern struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
 #endif /* STATS_INTERVAL */
 
 extern struct ethaddr_info ethaddr_tbl[RTE_MAX_ETHPORTS];
-- 
2.25.1


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

* [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 10:51 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix build error Radu Nicolau
@ 2021-11-03 11:56 ` Radu Nicolau
  2021-11-03 13:08   ` Thomas Monjalon
  2021-11-03 11:58 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix " Thomas Monjalon
  1 sibling, 1 reply; 9+ messages in thread
From: Radu Nicolau @ 2021-11-03 11:56 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal
  Cc: dev, declan.doherty, hemant.agrawal, anoobj, thomas, stable

When STATS_INTERVAL is set to a non-zero value the core_statistics array
will be defined in multiple compilation units and this can trigger a
linker error on particular environments. In order to fix this the
core_statistics definition was moved out of the header file.

Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 ++
 examples/ipsec-secgw/ipsec-secgw.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 5fcf424efe..ea8e3bcb87 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -291,6 +291,8 @@ adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,
 
 #if (STATS_INTERVAL > 0)
 
+struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+
 /* Print out statistics on packet distribution */
 static void
 print_stats_cb(__rte_unused void *param)
diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ipsec-secgw.h
index 96e22de45e..f9be303c28 100644
--- a/examples/ipsec-secgw/ipsec-secgw.h
+++ b/examples/ipsec-secgw/ipsec-secgw.h
@@ -93,7 +93,7 @@ struct ipsec_core_statistics {
 	uint64_t burst_rx;
 } __rte_cache_aligned;
 
-struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+extern struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
 #endif /* STATS_INTERVAL */
 
 extern struct ethaddr_info ethaddr_tbl[RTE_MAX_ETHPORTS];
-- 
2.25.1


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

* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix build error
  2021-11-03 10:51 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix build error Radu Nicolau
  2021-11-03 11:56 ` [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential " Radu Nicolau
@ 2021-11-03 11:58 ` Thomas Monjalon
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2021-11-03 11:58 UTC (permalink / raw)
  To: Radu Nicolau
  Cc: Akhil Goyal, dev, declan.doherty, hemant.agrawal, anoobj, stable

I don't see any compilation issue.
How do you trigger the problem?
The scope may be precised in the title.

03/11/2021 11:51, Radu Nicolau:
> Move core_statistics definition out of header file.

Why?
Please add explanation and error log here.

> Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>




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

* Re: [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 11:56 ` [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential " Radu Nicolau
@ 2021-11-03 13:08   ` Thomas Monjalon
  2021-11-03 13:36     ` [dpdk-dev] [EXT] " Akhil Goyal
  2021-11-03 13:42     ` [dpdk-dev] [dpdk-stable] " David Marchand
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Monjalon @ 2021-11-03 13:08 UTC (permalink / raw)
  To: Radu Nicolau
  Cc: Akhil Goyal, dev, declan.doherty, hemant.agrawal, anoobj, stable

03/11/2021 12:56, Radu Nicolau:
> When STATS_INTERVAL is set to a non-zero value the core_statistics array
> will be defined in multiple compilation units and this can trigger a
> linker error on particular environments. In order to fix this the
> core_statistics definition was moved out of the header file.

So it is not fixing compilation,
as we would never apply a patch which would completely break compilation.
I would say (in the title) that it moves global variable from header file.

> Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>




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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 13:08   ` Thomas Monjalon
@ 2021-11-03 13:36     ` Akhil Goyal
  2021-11-03 13:42     ` [dpdk-dev] [dpdk-stable] " David Marchand
  1 sibling, 0 replies; 9+ messages in thread
From: Akhil Goyal @ 2021-11-03 13:36 UTC (permalink / raw)
  To: Thomas Monjalon, Radu Nicolau
  Cc: dev, declan.doherty, hemant.agrawal, Anoob Joseph, stable

> 03/11/2021 12:56, Radu Nicolau:
> > When STATS_INTERVAL is set to a non-zero value the core_statistics array
> > will be defined in multiple compilation units and this can trigger a
> > linker error on particular environments. In order to fix this the
> > core_statistics definition was moved out of the header file.
> 
> So it is not fixing compilation,
> as we would never apply a patch which would completely break compilation.
> I would say (in the title) that it moves global variable from header file.
Updated title " 	examples/ipsec-secgw: move global array from header"
Applied to dpdk-next-crypto

Acked-by: Akhil Goyal <gakhil@marvell.com>

> 
> > Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet
> statistics")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> 
> 


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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 13:08   ` Thomas Monjalon
  2021-11-03 13:36     ` [dpdk-dev] [EXT] " Akhil Goyal
@ 2021-11-03 13:42     ` David Marchand
  2021-11-03 13:45       ` [dpdk-dev] [EXT] " Akhil Goyal
  1 sibling, 1 reply; 9+ messages in thread
From: David Marchand @ 2021-11-03 13:42 UTC (permalink / raw)
  To: Thomas Monjalon, Radu Nicolau, Akhil Goyal
  Cc: dev, Declan Doherty, Hemant Agrawal (OSS), Anoob Joseph, dpdk stable

On Wed, Nov 3, 2021 at 2:09 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 03/11/2021 12:56, Radu Nicolau:
> > When STATS_INTERVAL is set to a non-zero value the core_statistics array
> > will be defined in multiple compilation units and this can trigger a
> > linker error on particular environments. In order to fix this the
> > core_statistics definition was moved out of the header file.
>
> So it is not fixing compilation,
> as we would never apply a patch which would completely break compilation.
> I would say (in the title) that it moves global variable from header file.
>
> > Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

I guess it has to do with series:
https://patchwork.dpdk.org/project/dpdk/list/?series=20174

http://mails.dpdk.org/archives/test-report/2021-November/237332.html

So it should be part of this series.


-- 
David Marchand


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

* Re: [dpdk-dev] [EXT] Re: [dpdk-stable] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 13:42     ` [dpdk-dev] [dpdk-stable] " David Marchand
@ 2021-11-03 13:45       ` Akhil Goyal
  2021-11-03 13:50         ` David Marchand
  0 siblings, 1 reply; 9+ messages in thread
From: Akhil Goyal @ 2021-11-03 13:45 UTC (permalink / raw)
  To: David Marchand, Thomas Monjalon, Radu Nicolau
  Cc: dev, Declan Doherty, Hemant Agrawal (OSS), Anoob Joseph, dpdk stable

> On Wed, Nov 3, 2021 at 2:09 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > 03/11/2021 12:56, Radu Nicolau:
> > > When STATS_INTERVAL is set to a non-zero value the core_statistics array
> > > will be defined in multiple compilation units and this can trigger a
> > > linker error on particular environments. In order to fix this the
> > > core_statistics definition was moved out of the header file.
> >
> > So it is not fixing compilation,
> > as we would never apply a patch which would completely break
> compilation.
> > I would say (in the title) that it moves global variable from header file.
> >
> > > Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet
> statistics")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> 
> I guess it has to do with series:
> https://patchwork.dpdk.org/project/dpdk/list/?series=20174

Yes this series initiated the issue, applying both the patch and the series now
On next-crypto

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

* Re: [dpdk-dev] [EXT] Re: [dpdk-stable] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 13:45       ` [dpdk-dev] [EXT] " Akhil Goyal
@ 2021-11-03 13:50         ` David Marchand
  2021-11-03 13:55           ` Akhil Goyal
  0 siblings, 1 reply; 9+ messages in thread
From: David Marchand @ 2021-11-03 13:50 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Thomas Monjalon, Radu Nicolau, dev, Declan Doherty,
	Hemant Agrawal (OSS),
	Anoob Joseph, dpdk stable

On Wed, Nov 3, 2021 at 2:45 PM Akhil Goyal <gakhil@marvell.com> wrote:
>
> > On Wed, Nov 3, 2021 at 2:09 PM Thomas Monjalon <thomas@monjalon.net>
> > wrote:
> > >
> > > 03/11/2021 12:56, Radu Nicolau:
> > > > When STATS_INTERVAL is set to a non-zero value the core_statistics array
> > > > will be defined in multiple compilation units and this can trigger a
> > > > linker error on particular environments. In order to fix this the
> > > > core_statistics definition was moved out of the header file.
> > >
> > > So it is not fixing compilation,
> > > as we would never apply a patch which would completely break
> > compilation.
> > > I would say (in the title) that it moves global variable from header file.
> > >
> > > > Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet
> > statistics")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> >
> > I guess it has to do with series:
> > https://patchwork.dpdk.org/project/dpdk/list/?series=20174
>
> Yes this series initiated the issue, applying both the patch and the series now
> On next-crypto

It means a patch of this series broke compilation, and this fix here
should be squashed in it.


-- 
David Marchand


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

* Re: [dpdk-dev] [EXT] Re: [dpdk-stable] [PATCH v2] examples/ipsec-secgw: fix potential build error
  2021-11-03 13:50         ` David Marchand
@ 2021-11-03 13:55           ` Akhil Goyal
  0 siblings, 0 replies; 9+ messages in thread
From: Akhil Goyal @ 2021-11-03 13:55 UTC (permalink / raw)
  To: David Marchand
  Cc: Thomas Monjalon, Radu Nicolau, dev, Declan Doherty,
	Hemant Agrawal (OSS),
	Anoob Joseph, dpdk stable

> > Yes this series initiated the issue, applying both the patch and the series
> now
> > On next-crypto
> 
> It means a patch of this series broke compilation, and this fix here
> should be squashed in it.
Actually no, this is definitely an issue introduced earlier and should be part of stable.
This got highlighted here as STATS_INTERVAL ifdef was removed in this series.
The compilation is broken when STATS_INTEVAL is defined in the app.

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

end of thread, other threads:[~2021-11-03 13:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 10:51 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix build error Radu Nicolau
2021-11-03 11:56 ` [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix potential " Radu Nicolau
2021-11-03 13:08   ` Thomas Monjalon
2021-11-03 13:36     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-11-03 13:42     ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-11-03 13:45       ` [dpdk-dev] [EXT] " Akhil Goyal
2021-11-03 13:50         ` David Marchand
2021-11-03 13:55           ` Akhil Goyal
2021-11-03 11:58 ` [dpdk-dev] [PATCH] examples/ipsec-secgw: fix " Thomas Monjalon

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