DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] fix building with GCC 10
@ 2020-02-05 12:50 Timothy Redaelli
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 1/3] crypto/octeontx2: " Timothy Redaelli
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Timothy Redaelli @ 2020-02-05 12:50 UTC (permalink / raw)
  To: dev

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

See https://gcc.gnu.org/gcc-10/porting_to.html for more informations.

I didn't put -fcommon to CFLAGS since:
  Compiling with -fno-common is useful on targets for which it provides
  better performance, or if you wish to verify that the program will work
  on other systems that always treat uninitialized variable definitions
  this way.
from gcc man page

Timothy Redaelli (3):
  crypto/octeontx2: fix building with GCC 10
  app/test: fix building with GCC 10
  app/test-pipeline: fix building with GCC 10

 app/test-pipeline/config.c                    | 2 +-
 app/test/test_fib_perf.c                      | 2 +-
 app/test/test_lpm_perf.c                      | 2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     | 2 ++
 drivers/crypto/octeontx2/otx2_cryptodev.h     | 2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +-
 6 files changed, 7 insertions(+), 5 deletions(-)

-- 
2.24.1


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

* [dpdk-dev] [PATCH 1/3] crypto/octeontx2: fix building with GCC 10
  2020-02-05 12:50 [dpdk-dev] [PATCH 0/3] fix building with GCC 10 Timothy Redaelli
@ 2020-02-05 12:50 ` Timothy Redaelli
  2020-02-05 12:59   ` [dpdk-dev] [EXT] " Anoob Joseph
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 2/3] app/test: " Timothy Redaelli
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Timothy Redaelli @ 2020-02-05 12:50 UTC (permalink / raw)
  To: dev; +Cc: anoobj, stable

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")
Cc: anoobj@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev.c     | 2 ++
 drivers/crypto/octeontx2/otx2_cryptodev.h     | 2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7fd216bb3..957bcd720 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -24,6 +24,8 @@
 
 int otx2_cpt_logtype;
 
+uint8_t otx2_cryptodev_driver_id;
+
 static struct rte_pci_id pci_id_cpt_table[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h b/drivers/crypto/octeontx2/otx2_cryptodev.h
index 8e0ebc292..c0aa661b3 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
@@ -38,6 +38,6 @@ extern int otx2_cpt_logtype;
 /*
  * Crypto device driver ID
  */
-uint8_t otx2_cryptodev_driver_id;
+extern uint8_t otx2_cryptodev_driver_id;
 
 #endif /* _OTX2_CRYPTODEV_H_ */
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index a2724f722..f83e36b48 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -16,6 +16,6 @@ enum otx2_cpt_egrp {
 	OTX2_CPT_EGRP_AE = 2
 };
 
-struct rte_cryptodev_ops otx2_cpt_ops;
+extern struct rte_cryptodev_ops otx2_cpt_ops;
 
 #endif /* _OTX2_CRYPTODEV_OPS_H_ */
-- 
2.24.1


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

* [dpdk-dev] [PATCH 2/3] app/test: fix building with GCC 10
  2020-02-05 12:50 [dpdk-dev] [PATCH 0/3] fix building with GCC 10 Timothy Redaelli
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 1/3] crypto/octeontx2: " Timothy Redaelli
@ 2020-02-05 12:50 ` Timothy Redaelli
  2020-02-05 13:41   ` Medvedkin, Vladimir
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 3/3] app/test-pipeline: " Timothy Redaelli
  2020-03-04 10:09 ` [dpdk-dev] [PATCH 0/3] " David Marchand
  3 siblings, 1 reply; 8+ messages in thread
From: Timothy Redaelli @ 2020-02-05 12:50 UTC (permalink / raw)
  To: dev; +Cc: vladimir.medvedkin, stable

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 08e0c7581468 ("test/fib: add performance autotests")
Cc: vladimir.medvedkin@intel.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 app/test/test_fib_perf.c | 2 +-
 app/test/test_lpm_perf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 573087c3c..dd2e54db8 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -35,7 +35,7 @@ struct route_rule {
 	uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries
diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index a2578fe90..489719c40 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -34,7 +34,7 @@ struct route_rule {
 	uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries
-- 
2.24.1


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

* [dpdk-dev] [PATCH 3/3] app/test-pipeline: fix building with GCC 10
  2020-02-05 12:50 [dpdk-dev] [PATCH 0/3] fix building with GCC 10 Timothy Redaelli
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 1/3] crypto/octeontx2: " Timothy Redaelli
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 2/3] app/test: " Timothy Redaelli
@ 2020-02-05 12:50 ` Timothy Redaelli
  2020-02-05 13:26   ` [dpdk-dev] [dpdk-stable] " David Marchand
  2020-03-04 10:09 ` [dpdk-dev] [PATCH 0/3] " David Marchand
  3 siblings, 1 reply; 8+ messages in thread
From: Timothy Redaelli @ 2020-02-05 12:50 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu, stable

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
Cc: cristian.dumitrescu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 app/test-pipeline/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
index 28ac9fcc0..42c6ed9b2 100644
--- a/app/test-pipeline/config.c
+++ b/app/test-pipeline/config.c
@@ -42,7 +42,7 @@
 
 #include "main.h"
 
-struct app_params app;
+extern struct app_params app;
 
 static const char usage[] = "\n";
 
-- 
2.24.1


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

* Re: [dpdk-dev] [EXT] [PATCH 1/3] crypto/octeontx2: fix building with GCC 10
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 1/3] crypto/octeontx2: " Timothy Redaelli
@ 2020-02-05 12:59   ` Anoob Joseph
  0 siblings, 0 replies; 8+ messages in thread
From: Anoob Joseph @ 2020-02-05 12:59 UTC (permalink / raw)
  To: Timothy Redaelli, dev; +Cc: stable


> ----------------------------------------------------------------------
> GCC 10 defaults to -fno-common, this means a linker error will now be reported
> if the same global variable is defined in more than one compilation unit.
> 
> Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")
> Cc: anoobj@marvell.com
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  drivers/crypto/octeontx2/otx2_cryptodev.c     | 2 ++
>  drivers/crypto/octeontx2/otx2_cryptodev.h     | 2 +-
>  drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +-
>  3 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c
> b/drivers/crypto/octeontx2/otx2_cryptodev.c
> index 7fd216bb3..957bcd720 100644
> --- a/drivers/crypto/octeontx2/otx2_cryptodev.c
> +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
> @@ -24,6 +24,8 @@
> 
>  int otx2_cpt_logtype;
> 
> +uint8_t otx2_cryptodev_driver_id;
> +
>  static struct rte_pci_id pci_id_cpt_table[] = {
>  	{
>  		RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
> diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h
> b/drivers/crypto/octeontx2/otx2_cryptodev.h
> index 8e0ebc292..c0aa661b3 100644
> --- a/drivers/crypto/octeontx2/otx2_cryptodev.h
> +++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
> @@ -38,6 +38,6 @@ extern int otx2_cpt_logtype;
>  /*
>   * Crypto device driver ID
>   */
> -uint8_t otx2_cryptodev_driver_id;
> +extern uint8_t otx2_cryptodev_driver_id;
> 
>  #endif /* _OTX2_CRYPTODEV_H_ */
> diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
> b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
> index a2724f722..f83e36b48 100644
> --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
> +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
> @@ -16,6 +16,6 @@ enum otx2_cpt_egrp {
>  	OTX2_CPT_EGRP_AE = 2
>  };
> 
> -struct rte_cryptodev_ops otx2_cpt_ops;
> +extern struct rte_cryptodev_ops otx2_cpt_ops;
> 
>  #endif /* _OTX2_CRYPTODEV_OPS_H_ */
> --
> 2.24.1

Acked-by: Anoob Joseph <anoobj@marvell.com>

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 3/3] app/test-pipeline: fix building with GCC 10
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 3/3] app/test-pipeline: " Timothy Redaelli
@ 2020-02-05 13:26   ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2020-02-05 13:26 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev, Cristian Dumitrescu, dpdk stable

On Wed, Feb 5, 2020 at 1:51 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
>
> GCC 10 defaults to -fno-common, this means a linker error will now be
> reported if the same global variable is defined in more than one
> compilation unit.
>
> Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
> Cc: cristian.dumitrescu@intel.com
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  app/test-pipeline/config.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
> index 28ac9fcc0..42c6ed9b2 100644
> --- a/app/test-pipeline/config.c
> +++ b/app/test-pipeline/config.c
> @@ -42,7 +42,7 @@
>
>  #include "main.h"
>
> -struct app_params app;
> +extern struct app_params app;

app is already declared as extern in main.h.


--
David Marchand


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

* Re: [dpdk-dev] [PATCH 2/3] app/test: fix building with GCC 10
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 2/3] app/test: " Timothy Redaelli
@ 2020-02-05 13:41   ` Medvedkin, Vladimir
  0 siblings, 0 replies; 8+ messages in thread
From: Medvedkin, Vladimir @ 2020-02-05 13:41 UTC (permalink / raw)
  To: Timothy Redaelli, dev; +Cc: stable

On 05/02/2020 12:50, Timothy Redaelli wrote:
> GCC 10 defaults to -fno-common, this means a linker error will now be
> reported if the same global variable is defined in more than one
> compilation unit.
>
> Fixes: 08e0c7581468 ("test/fib: add performance autotests")
> Cc: vladimir.medvedkin@intel.com
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>   app/test/test_fib_perf.c | 2 +-
>   app/test/test_lpm_perf.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
> index 573087c3c..dd2e54db8 100644
> --- a/app/test/test_fib_perf.c
> +++ b/app/test/test_fib_perf.c
> @@ -35,7 +35,7 @@ struct route_rule {
>   	uint8_t depth;
>   };
>   
> -struct route_rule large_route_table[MAX_RULE_NUM];
> +static struct route_rule large_route_table[MAX_RULE_NUM];
>   
>   static uint32_t num_route_entries;
>   #define NUM_ROUTE_ENTRIES num_route_entries
> diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
> index a2578fe90..489719c40 100644
> --- a/app/test/test_lpm_perf.c
> +++ b/app/test/test_lpm_perf.c
> @@ -34,7 +34,7 @@ struct route_rule {
>   	uint8_t depth;
>   };
>   
> -struct route_rule large_route_table[MAX_RULE_NUM];
> +static struct route_rule large_route_table[MAX_RULE_NUM];
>   
>   static uint32_t num_route_entries;
>   #define NUM_ROUTE_ENTRIES num_route_entries
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

-- 
Regards,
Vladimir


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

* Re: [dpdk-dev] [PATCH 0/3] fix building with GCC 10
  2020-02-05 12:50 [dpdk-dev] [PATCH 0/3] fix building with GCC 10 Timothy Redaelli
                   ` (2 preceding siblings ...)
  2020-02-05 12:50 ` [dpdk-dev] [PATCH 3/3] app/test-pipeline: " Timothy Redaelli
@ 2020-03-04 10:09 ` David Marchand
  3 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2020-03-04 10:09 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev

On Wed, Feb 5, 2020 at 1:51 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
> GCC 10 defaults to -fno-common, this means a linker error will now be
> reported if the same global variable is defined in more than one
> compilation unit.
>
> See https://gcc.gnu.org/gcc-10/porting_to.html for more informations.
>
> I didn't put -fcommon to CFLAGS since:
>   Compiling with -fno-common is useful on targets for which it provides
>   better performance, or if you wish to verify that the program will work
>   on other systems that always treat uninitialized variable definitions
>   this way.
> from gcc man page

Series applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2020-03-04 10:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 12:50 [dpdk-dev] [PATCH 0/3] fix building with GCC 10 Timothy Redaelli
2020-02-05 12:50 ` [dpdk-dev] [PATCH 1/3] crypto/octeontx2: " Timothy Redaelli
2020-02-05 12:59   ` [dpdk-dev] [EXT] " Anoob Joseph
2020-02-05 12:50 ` [dpdk-dev] [PATCH 2/3] app/test: " Timothy Redaelli
2020-02-05 13:41   ` Medvedkin, Vladimir
2020-02-05 12:50 ` [dpdk-dev] [PATCH 3/3] app/test-pipeline: " Timothy Redaelli
2020-02-05 13:26   ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-03-04 10:09 ` [dpdk-dev] [PATCH 0/3] " David Marchand

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/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 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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