From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
stable@dpdk.org,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [PATCH 1/2] examples/qos_sched: fix unused but set global errors
Date: Thu, 3 Sep 2026 12:16:01 -0700 [thread overview]
Message-ID: <20260903191602.924372-1-stephen@networkplumber.org> (raw)
The QoS sched example tracks numa and port mask but never
uses them. Remove the dead code.
clang 23 reports:
qos_sched/args.c:26:17: error: variable 'app_numa_mask' set but not used
[-Werror,-Wunused-but-set-global]
qos_sched/args.c:27:17: error: variable 'app_used_port_mask' set but not used
[-Werror,-Wunused-but-set-global]
Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/qos_sched/args.c | 5 -----
examples/qos_sched/init.c | 1 -
2 files changed, 6 deletions(-)
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 886542b3c1..04e2a0e03c 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -23,8 +23,6 @@
#define SYS_CPU_DIR "/sys/devices/system/cpu/cpu%u/topology/"
static uint32_t app_main_core = 1;
-static uint32_t app_numa_mask;
-static uint64_t app_used_port_mask = 0;
static uint64_t app_used_rx_port_mask = 0;
static uint64_t app_used_tx_port_mask = 0;
@@ -214,7 +212,6 @@ app_parse_flow_conf(const char *conf_str)
return -1;
}
app_used_rx_port_mask |= mask;
- app_used_port_mask |= mask;
mask = 1lu << pconf->tx_port;
if (app_used_tx_port_mask & mask) {
@@ -223,7 +220,6 @@ app_parse_flow_conf(const char *conf_str)
return -1;
}
app_used_tx_port_mask |= mask;
- app_used_port_mask |= mask;
nb_pfc++;
@@ -404,7 +400,6 @@ app_parse_args(int argc, char **argv)
RTE_LOG(ERR, APP, "pfc %u: RX and WT must be on the same socket\n", i + 1);
return -1;
}
- app_numa_mask |= 1 << rte_lcore_to_socket_id(qos_conf[i].rx_core);
}
return 0;
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 561f9e0619..9f4b2e0082 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -19,7 +19,6 @@
#include "main.h"
#include "cfg_file.h"
-uint32_t app_numa_mask = 0;
static uint32_t app_inited_port_mask = 0;
int app_pipe_to_profile[MAX_SCHED_SUBPORTS][MAX_SCHED_PIPES];
--
2.53.0
next reply other threads:[~2026-09-03 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 19:16 Stephen Hemminger [this message]
2026-09-03 19:16 ` [PATCH 2/2] examples/vhost: remove unused but set globals Stephen Hemminger
2026-09-04 7:20 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903191602.924372-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.