DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] fix build with GCC 10
@ 2020-05-20 13:58 Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10 Thomas Monjalon
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-20 13:58 UTC (permalink / raw)
  To: dev; +Cc: david.marchand

These are supposed to be the last patches to support GCC 10.

Thomas Monjalon (4):
  net/mvpp2: fix build with gcc 10
  examples/vm_power: fix build with -fno-common
  examples/vm_power: drop Unix path limit redefinition
  devtools: allow warnings in ABI reference build

 devtools/test-build.sh                      | 6 ++----
 devtools/test-meson-builds.sh               | 3 +--
 drivers/net/mvpp2/mrvl_flow.c               | 4 ++--
 examples/vm_power_manager/channel_manager.c | 3 ++-
 examples/vm_power_manager/channel_manager.h | 9 ++-------
 examples/vm_power_manager/power_manager.c   | 1 -
 6 files changed, 9 insertions(+), 17 deletions(-)

-- 
2.26.2


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

* [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
@ 2020-05-20 13:58 ` Thomas Monjalon
  2020-05-20 14:05   ` [dpdk-dev] [EXT] " Liron Himi
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 2/4] examples/vm_power: fix build with -fno-common Thomas Monjalon
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-20 13:58 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, stable, Liron Himi, Natalie Samsonov, Tomasz Duszynski

GCC 10 is detecting the enum mismatch when assigning UDP variables
with MUSDK constants for TCP.

Fixes: 7235341d7517 ("net/mrvl: support classifier")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mvpp2/mrvl_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c
index 381b54e291..ea43255284 100644
--- a/drivers/net/mvpp2/mrvl_flow.c
+++ b/drivers/net/mvpp2/mrvl_flow.c
@@ -2511,14 +2511,14 @@ mrvl_create_cls_table(struct rte_eth_dev *dev, struct rte_flow *first_flow)
 
 	if (first_flow->pattern & F_UDP_SPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.tcp = MV_NET_TCP_F_SP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_SP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
 
 	if (first_flow->pattern & F_UDP_DPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.udp = MV_NET_TCP_F_DP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_DP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
-- 
2.26.2


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

* [dpdk-dev] [PATCH 2/4] examples/vm_power: fix build with -fno-common
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10 Thomas Monjalon
@ 2020-05-20 13:58 ` Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 3/4] examples/vm_power: drop Unix path limit redefinition Thomas Monjalon
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-20 13:58 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, stable, David Hunt, Nemanja Marjanovic,
	Rory Sexton, Santosh Shukla, Konstantin Ananyev

The variables of the same name are merged together
if compiled with -fcommon. It used to be the default.
This default behaviour allows to declare a variable in a header file and
share the variable in every .o binaries thanks to merge at link-time.

If compiling with -fno-common (default in GCC 10), the variable must be
shared as extern to avoid multiple re-definitions.

Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 examples/vm_power_manager/channel_manager.c | 2 ++
 examples/vm_power_manager/channel_manager.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 4ac21f02c1..4d13697208 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -35,6 +35,8 @@
 
 #define RTE_LOGTYPE_CHANNEL_MANAGER RTE_LOGTYPE_USER1
 
+struct libvirt_vm_info lvm_info[MAX_CLIENTS];
+
 /* Global pointer to libvirt connection */
 static virConnectPtr global_vir_conn_ptr;
 
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index 8284be0a18..a2a2f2bba0 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -41,7 +41,7 @@ struct libvirt_vm_info {
 	uint8_t num_cpus;
 };
 
-struct libvirt_vm_info lvm_info[MAX_CLIENTS];
+extern struct libvirt_vm_info lvm_info[MAX_CLIENTS];
 /* Communication Channel Status */
 enum channel_status { CHANNEL_MGR_CHANNEL_DISCONNECTED = 0,
 	CHANNEL_MGR_CHANNEL_CONNECTED,
-- 
2.26.2


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

* [dpdk-dev] [PATCH 3/4] examples/vm_power: drop Unix path limit redefinition
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10 Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 2/4] examples/vm_power: fix build with -fno-common Thomas Monjalon
@ 2020-05-20 13:58 ` Thomas Monjalon
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 4/4] devtools: allow warnings in ABI reference build Thomas Monjalon
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-20 13:58 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, stable, David Hunt, Bruce Richardson

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un.h.

This constant was re-defined locally, based on a variable declaration.
It is breaking compilation with -fno-common (default in GCC 10)
We could avoid the variable declaration by using NULL struct,
but it looks simpler not redefining this system constant.

As the power library and its examples are restricted to Linux only,
the Linux header file is directly included.

Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 examples/vm_power_manager/channel_manager.c | 1 -
 examples/vm_power_manager/channel_manager.h | 7 +------
 examples/vm_power_manager/power_manager.c   | 1 -
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 4d13697208..74a2a677e8 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -4,7 +4,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <inttypes.h>
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index a2a2f2bba0..e55376fcdb 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -10,7 +10,7 @@ extern "C" {
 #endif
 
 #include <linux/limits.h>
-#include <sys/un.h>
+#include <linux/un.h>
 #include <rte_atomic.h>
 #include <stdbool.h>
 
@@ -26,11 +26,6 @@ extern "C" {
 /* FIFO file name template */
 #define CHANNEL_MGR_FIFO_PATTERN_NAME   "fifo"
 
-#ifndef UNIX_PATH_MAX
-struct sockaddr_un _sockaddr_un;
-#define UNIX_PATH_MAX sizeof(_sockaddr_un.sun_path)
-#endif
-
 #define MAX_CLIENTS 64
 #define MAX_VCPUS 20
 
diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c
index 7b4f4b3c4d..cd51d4741f 100644
--- a/examples/vm_power_manager/power_manager.c
+++ b/examples/vm_power_manager/power_manager.c
@@ -6,7 +6,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <inttypes.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <dirent.h>
-- 
2.26.2


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

* [dpdk-dev] [PATCH 4/4] devtools: allow warnings in ABI reference build
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
                   ` (2 preceding siblings ...)
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 3/4] examples/vm_power: drop Unix path limit redefinition Thomas Monjalon
@ 2020-05-20 13:58 ` Thomas Monjalon
  2020-05-20 14:52 ` [dpdk-dev] [PATCH 0/4] fix build with GCC 10 David Marchand
  2020-05-20 16:45 ` Kevin Traynor
  5 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-20 13:58 UTC (permalink / raw)
  To: dev; +Cc: david.marchand

There is no point in forcing warning-free compilation when building
an ABI reference. It is only preventing from compiling ABI reference
of old releases with recent compilers.

Note: DPDK 20.02 is built (with warnings) by GCC 10 if using -fcommon.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-build.sh        | 6 ++----
 devtools/test-meson-builds.sh | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 6e53f86fc8..f013656024 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -68,8 +68,6 @@ J=$DPDK_MAKE_JOBS
 builds_dir=${DPDK_BUILD_TEST_DIR:-.}
 short=false
 unset verbose
-# for ABI checks, we need debuginfo
-test_cflags="-Wfatal-errors -g"
 while getopts hj:sv ARG ; do
 	case $ARG in
 		j ) J=$OPTARG ;;
@@ -248,7 +246,7 @@ for conf in $configs ; do
 	config $dir $target $options
 
 	echo "================== Build $conf"
-	${MAKE} -j$J EXTRA_CFLAGS="$test_cflags $DPDK_DEP_CFLAGS" \
+	${MAKE} -j$J EXTRA_CFLAGS="-Wfatal-errors -g $DPDK_DEP_CFLAGS" \
 		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
 	! $short || break
 	export RTE_TARGET=$target
@@ -282,7 +280,7 @@ for conf in $configs ; do
 			echo -n "================== Build $conf "
 			echo "($DPDK_ABI_REF_VERSION)"
 			${MAKE} -j$J \
-				EXTRA_CFLAGS="$test_cflags $DPDK_DEP_CFLAGS" \
+				EXTRA_CFLAGS="-Wno-error -g $DPDK_DEP_CFLAGS" \
 				EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
 				O=$abirefdir/build
 			export RTE_TARGET=$target
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index e8df017596..18b874fac5 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -74,7 +74,6 @@ config () # <dir> <builddir> <meson options>
 		return
 	fi
 	options=
-	options="$options --werror"
 	if echo $* | grep -qw -- '--default-library=shared' ; then
 		options="$options -Dexamples=all"
 	else
@@ -127,7 +126,7 @@ build () # <directory> <target compiler> <meson options>
 	# skip build if compiler not available
 	command -v ${CC##* } >/dev/null 2>&1 || return 0
 	load_env $targetcc || return 0
-	config $srcdir $builds_dir/$targetdir $*
+	config $srcdir $builds_dir/$targetdir --werror $*
 	compile $builds_dir/$targetdir
 	if [ -n "$DPDK_ABI_REF_VERSION" ]; then
 		abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
-- 
2.26.2


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

* Re: [dpdk-dev] [EXT] [PATCH 1/4] net/mvpp2: fix build with gcc 10
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10 Thomas Monjalon
@ 2020-05-20 14:05   ` Liron Himi
  0 siblings, 0 replies; 9+ messages in thread
From: Liron Himi @ 2020-05-20 14:05 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, stable, Natalie Samsonov, Tomasz Duszynski, Liron Himi

Acked-by: Liron Himi <lironh@marvell.com>

Regards,
Liron

-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net> 
Sent: Wednesday, 20 May 2020 16:58
To: dev@dpdk.org
Cc: david.marchand@redhat.com; stable@dpdk.org; Liron Himi <lironh@marvell.com>; Natalie Samsonov <nsamsono@marvell.com>; Tomasz Duszynski <tdu@semihalf.com>
Subject: [EXT] [PATCH 1/4] net/mvpp2: fix build with gcc 10

External Email

----------------------------------------------------------------------
GCC 10 is detecting the enum mismatch when assigning UDP variables with MUSDK constants for TCP.

Fixes: 7235341d7517 ("net/mrvl: support classifier")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mvpp2/mrvl_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c index 381b54e291..ea43255284 100644
--- a/drivers/net/mvpp2/mrvl_flow.c
+++ b/drivers/net/mvpp2/mrvl_flow.c
@@ -2511,14 +2511,14 @@ mrvl_create_cls_table(struct rte_eth_dev *dev, struct rte_flow *first_flow)
 
 	if (first_flow->pattern & F_UDP_SPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.tcp = MV_NET_TCP_F_SP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_SP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
 
 	if (first_flow->pattern & F_UDP_DPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.udp = MV_NET_TCP_F_DP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_DP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
--
2.26.2


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

* Re: [dpdk-dev] [PATCH 0/4] fix build with GCC 10
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
                   ` (3 preceding siblings ...)
  2020-05-20 13:58 ` [dpdk-dev] [PATCH 4/4] devtools: allow warnings in ABI reference build Thomas Monjalon
@ 2020-05-20 14:52 ` David Marchand
  2020-05-20 16:45 ` Kevin Traynor
  5 siblings, 0 replies; 9+ messages in thread
From: David Marchand @ 2020-05-20 14:52 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Wed, May 20, 2020 at 3:58 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> These are supposed to be the last patches to support GCC 10.
>
> Thomas Monjalon (4):
>   net/mvpp2: fix build with gcc 10
>   examples/vm_power: fix build with -fno-common
>   examples/vm_power: drop Unix path limit redefinition
>   devtools: allow warnings in ABI reference build
>
>  devtools/test-build.sh                      | 6 ++----
>  devtools/test-meson-builds.sh               | 3 +--
>  drivers/net/mvpp2/mrvl_flow.c               | 4 ++--
>  examples/vm_power_manager/channel_manager.c | 3 ++-
>  examples/vm_power_manager/channel_manager.h | 9 ++-------
>  examples/vm_power_manager/power_manager.c   | 1 -
>  6 files changed, 9 insertions(+), 17 deletions(-)

For the series,
Acked-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH 0/4] fix build with GCC 10
  2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
                   ` (4 preceding siblings ...)
  2020-05-20 14:52 ` [dpdk-dev] [PATCH 0/4] fix build with GCC 10 David Marchand
@ 2020-05-20 16:45 ` Kevin Traynor
  2020-05-21 13:39   ` Thomas Monjalon
  5 siblings, 1 reply; 9+ messages in thread
From: Kevin Traynor @ 2020-05-20 16:45 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: david.marchand

On 20/05/2020 14:58, Thomas Monjalon wrote:
> These are supposed to be the last patches to support GCC 10.
> 
> Thomas Monjalon (4):
>   net/mvpp2: fix build with gcc 10
>   examples/vm_power: fix build with -fno-common
>   examples/vm_power: drop Unix path limit redefinition
>   devtools: allow warnings in ABI reference build
> 
>  devtools/test-build.sh                      | 6 ++----
>  devtools/test-meson-builds.sh               | 3 +--
>  drivers/net/mvpp2/mrvl_flow.c               | 4 ++--
>  examples/vm_power_manager/channel_manager.c | 3 ++-
>  examples/vm_power_manager/channel_manager.h | 9 ++-------
>  examples/vm_power_manager/power_manager.c   | 1 -
>  6 files changed, 9 insertions(+), 17 deletions(-)
> 
For series:
Acked-by: Kevin Traynor <ktraynor@redhat.com>


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

* Re: [dpdk-dev] [PATCH 0/4] fix build with GCC 10
  2020-05-20 16:45 ` Kevin Traynor
@ 2020-05-21 13:39   ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-05-21 13:39 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: dev, david.marchand

20/05/2020 18:45, Kevin Traynor:
> On 20/05/2020 14:58, Thomas Monjalon wrote:
> > These are supposed to be the last patches to support GCC 10.
> > 
> > Thomas Monjalon (4):
> >   net/mvpp2: fix build with gcc 10
> >   examples/vm_power: fix build with -fno-common
> >   examples/vm_power: drop Unix path limit redefinition
> >   devtools: allow warnings in ABI reference build
> > 
> >  devtools/test-build.sh                      | 6 ++----
> >  devtools/test-meson-builds.sh               | 3 +--
> >  drivers/net/mvpp2/mrvl_flow.c               | 4 ++--
> >  examples/vm_power_manager/channel_manager.c | 3 ++-
> >  examples/vm_power_manager/channel_manager.h | 9 ++-------
> >  examples/vm_power_manager/power_manager.c   | 1 -
> >  6 files changed, 9 insertions(+), 17 deletions(-)
> > 
> For series:
> Acked-by: Kevin Traynor <ktraynor@redhat.com>

Applied



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

end of thread, other threads:[~2020-05-21 13:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 13:58 [dpdk-dev] [PATCH 0/4] fix build with GCC 10 Thomas Monjalon
2020-05-20 13:58 ` [dpdk-dev] [PATCH 1/4] net/mvpp2: fix build with gcc 10 Thomas Monjalon
2020-05-20 14:05   ` [dpdk-dev] [EXT] " Liron Himi
2020-05-20 13:58 ` [dpdk-dev] [PATCH 2/4] examples/vm_power: fix build with -fno-common Thomas Monjalon
2020-05-20 13:58 ` [dpdk-dev] [PATCH 3/4] examples/vm_power: drop Unix path limit redefinition Thomas Monjalon
2020-05-20 13:58 ` [dpdk-dev] [PATCH 4/4] devtools: allow warnings in ABI reference build Thomas Monjalon
2020-05-20 14:52 ` [dpdk-dev] [PATCH 0/4] fix build with GCC 10 David Marchand
2020-05-20 16:45 ` Kevin Traynor
2020-05-21 13:39   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://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