DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicolas Chautru <nicolas.chautru@intel.com>
To: dev@dpdk.org, akhil.goyal@nxp.com, trix@redhat.com
Cc: david.marchand@redhat.com, Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/7] app/bbdev: add explicit check for counters
Date: Fri, 23 Oct 2020 16:33:42 -0700
Message-ID: <1603496027-33918-3-git-send-email-nicolas.chautru@intel.com> (raw)
In-Reply-To: <1603496027-33918-1-git-send-email-nicolas.chautru@intel.com>

Adding explict check in ut that the stats counters
have the expect values. Was missing for coverage.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.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 3554a77..b62848e 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -4840,6 +4840,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


  parent reply	other threads:[~2020-10-23 23:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 23:33 [dpdk-dev] [PATCH v4 0/7] BBDEV test updates Nicolas Chautru
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 1/7] app/bbdev: add explicit ut for latency vs validation Nicolas Chautru
2020-10-23 23:33 ` Nicolas Chautru [this message]
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 3/7] app/bbdev: include explict HARQ preloading Nicolas Chautru
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 4/7] app/bbdev: define wait for offload Nicolas Chautru
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 5/7] app/bbdev: skip bler ut when compression is used Nicolas Chautru
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 6/7] app/bbdev: reduce duration of throughput test Nicolas Chautru
2020-10-23 23:33 ` [dpdk-dev] [PATCH v4 7/7] app/bbdev: update offload test to dequeue full ring Nicolas Chautru

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=1603496027-33918-3-git-send-email-nicolas.chautru@intel.com \
    --to=nicolas.chautru@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=trix@redhat.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git