* [PATCH] ethdev/telemetry: fix hide_zero parameter being reset
@ 2026-10-30 3:41 Chengwen Feng
2026-11-05 14:25 ` Bruce Richardson
2026-11-09 22:01 ` Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: Chengwen Feng @ 2026-10-30 3:41 UTC (permalink / raw)
To: thomas, stephen; +Cc: dev
When the "hide_zero" parameter is parsed successfully in the ethdev
telemetry regs command, the else branch unconditionally resets
hide_zero back to false, discarding the parsed value. As a result the
hide_zero option is silently ignored.
Remove the unnecessary reset so the parsed hide_zero value is retained
and passed to eth_dev_get_port_regs().
Fixes: ba4d57bd849d ("ethdev: support hide zero in registers telemetry")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/ethdev/rte_ethdev_telemetry.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/ethdev/rte_ethdev_telemetry.c b/lib/ethdev/rte_ethdev_telemetry.c
index ca7f4681c9..caa7b33e1e 100644
--- a/lib/ethdev/rte_ethdev_telemetry.c
+++ b/lib/ethdev/rte_ethdev_telemetry.c
@@ -1515,13 +1515,11 @@ eth_dev_handle_port_regs(const char *cmd __rte_unused,
kvlist = rte_kvargs_parse(end_param, valid_keys);
filter_val = rte_kvargs_get(kvlist, "filter");
ret = rte_kvargs_process(kvlist, "hide_zero", eth_dev_parse_hide_zero, &hide_zero);
- if (kvlist == NULL || (filter_val != NULL && strlen(filter_val) == 0) || ret != 0) {
+ if (kvlist == NULL || (filter_val != NULL && strlen(filter_val) == 0) || ret != 0)
RTE_ETHDEV_LOG_LINE(NOTICE,
"Unknown extra parameters passed to ethdev telemetry command, ignoring");
- } else {
+ else
filter = (filter_val != NULL) ? strdup(filter_val) : NULL;
- hide_zero = false;
- }
rte_kvargs_free(kvlist);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ethdev/telemetry: fix hide_zero parameter being reset
2026-10-30 3:41 [PATCH] ethdev/telemetry: fix hide_zero parameter being reset Chengwen Feng
@ 2026-11-05 14:25 ` Bruce Richardson
2026-11-09 22:01 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2026-11-05 14:25 UTC (permalink / raw)
To: Chengwen Feng; +Cc: thomas, stephen, dev
On Fri, Oct 30, 2026 at 11:41:57AM +0800, Chengwen Feng wrote:
> When the "hide_zero" parameter is parsed successfully in the ethdev
> telemetry regs command, the else branch unconditionally resets
> hide_zero back to false, discarding the parsed value. As a result the
> hide_zero option is silently ignored.
>
> Remove the unnecessary reset so the parsed hide_zero value is retained
> and passed to eth_dev_get_port_regs().
>
> Fixes: ba4d57bd849d ("ethdev: support hide zero in registers telemetry")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> lib/ethdev/rte_ethdev_telemetry.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ethdev/telemetry: fix hide_zero parameter being reset
2026-10-30 3:41 [PATCH] ethdev/telemetry: fix hide_zero parameter being reset Chengwen Feng
2026-11-05 14:25 ` Bruce Richardson
@ 2026-11-09 22:01 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-11-09 22:01 UTC (permalink / raw)
To: Chengwen Feng; +Cc: thomas, dev
On Fri, 30 Oct 2026 11:41:57 +0800
Chengwen Feng <fengchengwen@huawei.com> wrote:
> When the "hide_zero" parameter is parsed successfully in the ethdev
> telemetry regs command, the else branch unconditionally resets
> hide_zero back to false, discarding the parsed value. As a result the
> hide_zero option is silently ignored.
>
> Remove the unnecessary reset so the parsed hide_zero value is retained
> and passed to eth_dev_get_port_regs().
>
> Fixes: ba4d57bd849d ("ethdev: support hide zero in registers telemetry")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
Applied to next-net.
Note: this all gets a lot cleaner if/when the kvargs helpers get merged
https://patchwork.dpdk.org/project/dpdk/patch/20260930224340.58580-3-stephen@networkplumber.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-09 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 3:41 [PATCH] ethdev/telemetry: fix hide_zero parameter being reset Chengwen Feng
2026-11-05 14:25 ` Bruce Richardson
2026-11-09 22:01 ` Stephen Hemminger
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.