* Re: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
@ 2020-09-15 2:56 Liu, Tianjiao
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Tianjiao @ 2020-09-15 2:56 UTC (permalink / raw)
To: dev, akhil.goyal; +Cc: Chautru, Nicolas
On Tue, 18 Aug 2020 17:05:52 -0700, Nicolas Chautru wrote:
> Adding explicit check in ut that the stats counters
> have the expected values. Was missing for coverage.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com<mailto:tianjiao.liu@intel.com>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
2020-08-19 0:05 ` [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters Nicolas Chautru
2020-09-15 9:53 ` Aidan Goddard
@ 2020-09-15 10:02 ` Dave Burley
1 sibling, 0 replies; 4+ messages in thread
From: Dave Burley @ 2020-09-15 10:02 UTC (permalink / raw)
To: Nicolas Chautru, dev, akhil.goyal; +Cc: bruce.richardson, Aidan Goddard
Acked-by: Dave Burley <dave.burley@accelercomm.com>
From: dev <dev-bounces@dpdk.org> on behalf of Nicolas Chautru <nicolas.chautru@intel.com>
Sent: 19 August 2020 01:05
To: dev@dpdk.org <dev@dpdk.org>; akhil.goyal@nxp.com <akhil.goyal@nxp.com>
Cc: bruce.richardson@intel.com <bruce.richardson@intel.com>; Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
Adding explicit check in ut that the stats counters
have the expected values. Was missing for coverage.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 1319afd..b0b6f18 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -4769,6 +4769,23 @@ typedef int (test_case_function)(struct active_device *ad,
(double)(time_st.deq_max_time * 1000000) /
rte_get_tsc_hz());
+ struct rte_bbdev_stats stats = {0};
+ get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
+ if (op_type != RTE_BBDEV_OP_LDPC_DEC) {
+ TEST_ASSERT_SUCCESS(stats.enqueued_count != num_to_process,
+ "Mismatch in enqueue count %10"PRIu64" %d",
+ stats.enqueued_count, num_to_process);
+ TEST_ASSERT_SUCCESS(stats.dequeued_count != num_to_process,
+ "Mismatch in dequeue count %10"PRIu64" %d",
+ stats.dequeued_count, num_to_process);
+ }
+ TEST_ASSERT_SUCCESS(stats.enqueue_err_count != 0,
+ "Enqueue count Error %10"PRIu64"",
+ stats.enqueue_err_count);
+ TEST_ASSERT_SUCCESS(stats.dequeue_err_count != 0,
+ "Dequeue count Error (%10"PRIu64"",
+ stats.dequeue_err_count);
+
return TEST_SUCCESS;
#endif
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
2020-08-19 0:05 ` [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters Nicolas Chautru
@ 2020-09-15 9:53 ` Aidan Goddard
2020-09-15 10:02 ` Dave Burley
1 sibling, 0 replies; 4+ messages in thread
From: Aidan Goddard @ 2020-09-15 9:53 UTC (permalink / raw)
To: Nicolas Chautru, dev, akhil.goyal; +Cc: bruce.richardson
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
From: dev <dev-bounces@dpdk.org> on behalf of Nicolas Chautru <nicolas.chautru@intel.com>
Sent: 19 August 2020 01:05
To: dev@dpdk.org <dev@dpdk.org>; akhil.goyal@nxp.com <akhil.goyal@nxp.com>
Cc: bruce.richardson@intel.com <bruce.richardson@intel.com>; Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
Adding explicit check in ut that the stats counters
have the expected values. Was missing for coverage.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 1319afd..b0b6f18 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -4769,6 +4769,23 @@ typedef int (test_case_function)(struct active_device *ad,
(double)(time_st.deq_max_time * 1000000) /
rte_get_tsc_hz());
+ struct rte_bbdev_stats stats = {0};
+ get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
+ if (op_type != RTE_BBDEV_OP_LDPC_DEC) {
+ TEST_ASSERT_SUCCESS(stats.enqueued_count != num_to_process,
+ "Mismatch in enqueue count %10"PRIu64" %d",
+ stats.enqueued_count, num_to_process);
+ TEST_ASSERT_SUCCESS(stats.dequeued_count != num_to_process,
+ "Mismatch in dequeue count %10"PRIu64" %d",
+ stats.dequeued_count, num_to_process);
+ }
+ TEST_ASSERT_SUCCESS(stats.enqueue_err_count != 0,
+ "Enqueue count Error %10"PRIu64"",
+ stats.enqueue_err_count);
+ TEST_ASSERT_SUCCESS(stats.dequeue_err_count != 0,
+ "Dequeue count Error (%10"PRIu64"",
+ stats.dequeue_err_count);
+
return TEST_SUCCESS;
#endif
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
2020-08-19 0:05 [dpdk-dev] [PATCH v3 0/7] BBDEV test updates Nicolas Chautru
@ 2020-08-19 0:05 ` Nicolas Chautru
2020-09-15 9:53 ` Aidan Goddard
2020-09-15 10:02 ` Dave Burley
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Chautru @ 2020-08-19 0:05 UTC (permalink / raw)
To: dev, akhil.goyal; +Cc: bruce.richardson, Nicolas Chautru
Adding explicit check in ut that the stats counters
have the expected values. Was missing for coverage.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 1319afd..b0b6f18 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -4769,6 +4769,23 @@ typedef int (test_case_function)(struct active_device *ad,
(double)(time_st.deq_max_time * 1000000) /
rte_get_tsc_hz());
+ struct rte_bbdev_stats stats = {0};
+ get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
+ if (op_type != RTE_BBDEV_OP_LDPC_DEC) {
+ TEST_ASSERT_SUCCESS(stats.enqueued_count != num_to_process,
+ "Mismatch in enqueue count %10"PRIu64" %d",
+ stats.enqueued_count, num_to_process);
+ TEST_ASSERT_SUCCESS(stats.dequeued_count != num_to_process,
+ "Mismatch in dequeue count %10"PRIu64" %d",
+ stats.dequeued_count, num_to_process);
+ }
+ TEST_ASSERT_SUCCESS(stats.enqueue_err_count != 0,
+ "Enqueue count Error %10"PRIu64"",
+ stats.enqueue_err_count);
+ TEST_ASSERT_SUCCESS(stats.dequeue_err_count != 0,
+ "Dequeue count Error (%10"PRIu64"",
+ stats.dequeue_err_count);
+
return TEST_SUCCESS;
#endif
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-15 10:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 2:56 [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters Liu, Tianjiao
-- strict thread matches above, loose matches on Subject: below --
2020-08-19 0:05 [dpdk-dev] [PATCH v3 0/7] BBDEV test updates Nicolas Chautru
2020-08-19 0:05 ` [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters Nicolas Chautru
2020-09-15 9:53 ` Aidan Goddard
2020-09-15 10:02 ` Dave Burley
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).