[dpdk-stable] patch 'app/testpmd: fix build with musl' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:00:26 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ba7c3d6befb03931531112f69105c880370f497e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ba7c3d6befb03931531112f69105c880370f497e Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa at alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:09 +0100
Subject: [PATCH] app/testpmd: fix build with musl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]

1/ Improve portability by avoiding use of non-standard 'uint'.
Use uint8_t for hash_key_len as rss_key_len is a uint8_t type.
This solves following build error when building with musl libc:
    app/test-pmd/testpmd.h:813:29: error: unknown type name 'uint'

2/ In musl libc, stdout is of type (FILE * const).
Because of the const qualifier, a dark magic cast
must be achieved through uintptr_t.

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: David Marchand <david.marchand at redhat.com>
---
 app/test-pmd/bpf_cmd.c | 2 +-
 app/test-pmd/config.c  | 2 +-
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 066619e115..6980291f07 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -20,7 +20,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
 		.name = RTE_STR(stdout),
 		.type = RTE_BPF_XTYPE_VAR,
 		.var = {
-			.val = &stdout,
+			.val = (void *)(uintptr_t)&stdout,
 			.desc = {
 				.type = RTE_BPF_ARG_PTR,
 				.size = sizeof(stdout),
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 336d3e59b1..5f147ec711 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2963,7 +2963,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 
 void
 port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
-			 uint hash_key_len)
+			 uint8_t hash_key_len)
 {
 	struct rte_eth_rss_conf rss_conf;
 	int diag;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2f8f5a92e4..1c276f4644 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -934,7 +934,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
 
 void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
 void port_rss_hash_key_update(portid_t port_id, char rss_type[],
-			      uint8_t *hash_key, uint hash_key_len);
+			      uint8_t *hash_key, uint8_t hash_key_len);
 int rx_queue_id_is_invalid(queueid_t rxq_id);
 int tx_queue_id_is_invalid(queueid_t txq_id);
 void setup_gro(const char *onoff, portid_t port_id);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.633442500 +0800
+++ 0078-app-testpmd-fix-build-with-musl.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 3529e8f3a5e62919c6528457c68f0c5c26cfdada Mon Sep 17 00:00:00 2001
+From ba7c3d6befb03931531112f69105c880370f497e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -47 +49 @@
-index 4ce75a8e73..ef0b9784d0 100644
+index 336d3e59b1..5f147ec711 100644
@@ -50 +52 @@
-@@ -2674,7 +2674,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
+@@ -2963,7 +2963,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
@@ -60 +62 @@
-index af40859170..a87ccb0f0f 100644
+index 2f8f5a92e4..1c276f4644 100644
@@ -63 +65 @@
-@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
+@@ -934,7 +934,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,


More information about the stable mailing list