* [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting
@ 2018-05-04 20:12 Daniel Shelepov
2018-05-11 11:18 ` Iremonger, Bernard
2018-05-14 21:12 ` [dpdk-dev] [PATCH v2] " Daniel Shelepov
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Shelepov @ 2018-05-04 20:12 UTC (permalink / raw)
To: wenzhuo.lu, jingjing.wu; +Cc: dev, Daniel Shelepov
When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
burst statistics and includes them in the port stats report. The
summary should include top 2 most frequent burst sizes, but there is a
bug in finding the top-2. During the scan of burst size counts, the
top-2 can change only if top-1 also changes.
Added logic to update the top-2 if current burst size is larger than
existing top-2, but smaller than existing top-1.
Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
---
app/test-pmd/testpmd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index db23f23e5..cc38e51fc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -927,6 +927,9 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
pktnb_stats[1] = pktnb_stats[0];
burst_stats[0] = nb_burst;
pktnb_stats[0] = nb_pkt;
+ } else if (nb_burst > burst_stats[1]) {
+ burst_stats[1] = nb_burst;
+ pktnb_stats[1] = nb_pkt;
}
}
if (total_burst == 0)
--
2.15.1.gvfs.2.39.g03d366a
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting
2018-05-04 20:12 [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting Daniel Shelepov
@ 2018-05-11 11:18 ` Iremonger, Bernard
2018-05-14 21:12 ` [dpdk-dev] [PATCH v2] " Daniel Shelepov
1 sibling, 0 replies; 5+ messages in thread
From: Iremonger, Bernard @ 2018-05-11 11:18 UTC (permalink / raw)
To: Daniel Shelepov, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev
Hi Daniel,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Daniel Shelepov
> Sent: Friday, May 4, 2018 9:12 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Daniel Shelepov <dashel@microsoft.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting
>
> When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
> burst statistics and includes them in the port stats report. The summary
> should include top 2 most frequent burst sizes, but there is a bug in finding
> the top-2. During the scan of burst size counts, the
> top-2 can change only if top-1 also changes.
>
> Added logic to update the top-2 if current burst size is larger than existing
> top-2, but smaller than existing top-1.
Could you add a fixes line.
>
> Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
> ---
> app/test-pmd/testpmd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> db23f23e5..cc38e51fc 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -927,6 +927,9 @@ pkt_burst_stats_display(const char *rx_tx, struct
> pkt_burst_stats *pbs)
> pktnb_stats[1] = pktnb_stats[0];
> burst_stats[0] = nb_burst;
> pktnb_stats[0] = nb_pkt;
> + } else if (nb_burst > burst_stats[1]) {
> + burst_stats[1] = nb_burst;
> + pktnb_stats[1] = nb_pkt;
> }
> }
> if (total_burst == 0)
> --
> 2.15.1.gvfs.2.39.g03d366a
Regards,
Bernard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] app/testpmd: fix burst stat reporting
2018-05-04 20:12 [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting Daniel Shelepov
2018-05-11 11:18 ` Iremonger, Bernard
@ 2018-05-14 21:12 ` Daniel Shelepov
2018-05-16 11:09 ` Iremonger, Bernard
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Shelepov @ 2018-05-14 21:12 UTC (permalink / raw)
To: wenzhuo.lu, jingjing.wu, bernard.iremonger; +Cc: dev, Daniel Shelepov
When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
burst statistics and includes them in the port stats report. The
summary should include top 2 most frequent burst sizes, but there is a
bug in finding the top-2. During the scan of burst size counts, the
top-2 can change only if top-1 also changes.
Added logic to update the top-2 if current burst size is larger than
existing top-2, but smaller than existing top-1.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
---
app/test-pmd/testpmd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index db23f23e5..cc38e51fc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -927,6 +927,9 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
pktnb_stats[1] = pktnb_stats[0];
burst_stats[0] = nb_burst;
pktnb_stats[0] = nb_pkt;
+ } else if (nb_burst > burst_stats[1]) {
+ burst_stats[1] = nb_burst;
+ pktnb_stats[1] = nb_pkt;
}
}
if (total_burst == 0)
--
2.15.1.gvfs.2.39.g03d366a
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix burst stat reporting
2018-05-14 21:12 ` [dpdk-dev] [PATCH v2] " Daniel Shelepov
@ 2018-05-16 11:09 ` Iremonger, Bernard
2018-05-21 15:15 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Iremonger, Bernard @ 2018-05-16 11:09 UTC (permalink / raw)
To: Daniel Shelepov, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev
> -----Original Message-----
> From: Daniel Shelepov [mailto:dashel@microsoft.com]
> Sent: Monday, May 14, 2018 10:12 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Daniel Shelepov <dashel@microsoft.com>
> Subject: [PATCH v2] app/testpmd: fix burst stat reporting
>
> When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
> burst statistics and includes them in the port stats report. The summary
> should include top 2 most frequent burst sizes, but there is a bug in finding
> the top-2. During the scan of burst size counts, the
> top-2 can change only if top-1 also changes.
>
> Added logic to update the top-2 if current burst size is larger than existing
> top-2, but smaller than existing top-1.
>
> Fixes: af75078fece3 ("first public release")
>
> Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix burst stat reporting
2018-05-16 11:09 ` Iremonger, Bernard
@ 2018-05-21 15:15 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-05-21 15:15 UTC (permalink / raw)
To: Daniel Shelepov; +Cc: dev, Iremonger, Bernard, Lu, Wenzhuo, Wu, Jingjing
> > When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
> > burst statistics and includes them in the port stats report. The summary
> > should include top 2 most frequent burst sizes, but there is a bug in finding
> > the top-2. During the scan of burst size counts, the
> > top-2 can change only if top-1 also changes.
> >
> > Added logic to update the top-2 if current burst size is larger than existing
> > top-2, but smaller than existing top-1.
> >
> > Fixes: af75078fece3 ("first public release")
> >
> > Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-21 15:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 20:12 [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting Daniel Shelepov
2018-05-11 11:18 ` Iremonger, Bernard
2018-05-14 21:12 ` [dpdk-dev] [PATCH v2] " Daniel Shelepov
2018-05-16 11:09 ` Iremonger, Bernard
2018-05-21 15:15 ` 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).