* [PATCH] pdump: clear statistics when enabled
@ 2024-12-19 23:58 Stephen Hemminger
2025-03-19 2:59 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2024-12-19 23:58 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, stable
The pdump statistics are used to keep track of the number
of packets captured, filtered, etc. These need not be cumalative
and instead should be start counting when capture starts.
This fixes the issue where multiple invocations of dumpcap
would include counts from previous invocations.
Bugzilla ID: 1604
Fixes: 10f726efe26c ("pdump: support pcapng and filtering")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/pdump/rte_pdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index 679c3dd0b5..0e6ffc167b 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -199,6 +199,8 @@ pdump_register_rx_callbacks(enum pdump_version ver,
rte_errno);
return rte_errno;
}
+
+ memset(&pdump_stats->rx[port][qid], 0, sizeof(struct rte_pdump_stats));
} else if (operation == DISABLE) {
int ret;
@@ -257,6 +259,7 @@ pdump_register_tx_callbacks(enum pdump_version ver,
rte_errno);
return rte_errno;
}
+ memset(&pdump_stats->tx[port][qid], 0, sizeof(struct rte_pdump_stats));
} else if (operation == DISABLE) {
int ret;
--
2.45.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pdump: clear statistics when enabled
2024-12-19 23:58 [PATCH] pdump: clear statistics when enabled Stephen Hemminger
@ 2025-03-19 2:59 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2025-03-19 2:59 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, stable
20/12/2024 00:58, Stephen Hemminger:
> The pdump statistics are used to keep track of the number
> of packets captured, filtered, etc. These need not be cumalative
> and instead should be start counting when capture starts.
>
> This fixes the issue where multiple invocations of dumpcap
> would include counts from previous invocations.
>
> Bugzilla ID: 1604
> Fixes: 10f726efe26c ("pdump: support pcapng and filtering")
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Sorry this "christmas" patch was forgotten.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-19 2:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 23:58 [PATCH] pdump: clear statistics when enabled Stephen Hemminger
2025-03-19 2:59 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).