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

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon May 17 18:07:54 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/96d8538b1ca6cb1ba7d86cdff0855de1bbda1265

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 96d8538b1ca6cb1ba7d86cdff0855de1bbda1265 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

[ 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 d2deadd4e6..3899d9f724 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 e14ff42745..ce6fb44d5a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2138,7 +2138,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 4dbcee3a62..a955e731e5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -820,7 +820,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.317920050 +0200
+++ 0045-app-testpmd-fix-build-with-musl.patch	2021-05-17 17:40:29.179809538 +0200
@@ -1 +1 @@
-From 3529e8f3a5e62919c6528457c68f0c5c26cfdada Mon Sep 17 00:00:00 2001
+From 96d8538b1ca6cb1ba7d86cdff0855de1bbda1265 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -34 +35 @@
-index 066619e115..6980291f07 100644
+index d2deadd4e6..3899d9f724 100644
@@ -47 +48 @@
-index 4ce75a8e73..ef0b9784d0 100644
+index e14ff42745..ce6fb44d5a 100644
@@ -50 +51 @@
-@@ -2674,7 +2674,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
+@@ -2138,7 +2138,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
@@ -60 +61 @@
-index af40859170..a87ccb0f0f 100644
+index 4dbcee3a62..a955e731e5 100644
@@ -63 +64 @@
-@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
+@@ -820,7 +820,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,


More information about the stable mailing list