DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bernard Iremonger <bernard.iremonger@intel.com>
To: dev@dpdk.org, konstantin.ananyev@intel.com, akhil.goyal@nxp.com
Cc: Bernard Iremonger <bernard.iremonger@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13
Date: Wed, 22 May 2019 14:38:18 +0100	[thread overview]
Message-ID: <1558532302-15932-1-git-send-email-bernard.iremonger@intel.com> (raw)

Calling rte_cryptodev_enqueue_burst() in a loop for 1
packet at a time results in some random mbufs with 36 leading 0's.

Calling rte_cryptodev_enqueue_burst() for a burst of packets solves
this issue.

Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_ipsec.c | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 64e56c0..9859cb9 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -897,13 +897,14 @@ crypto_ipsec_2sa(void)
 				"rte_ipsec_pkt_crypto_prepare fail\n");
 			return TEST_FAILED;
 		}
-		k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
-				ut_params->cop + i, 1);
-		if (k != 1) {
-			RTE_LOG(ERR, USER1,
-				"rte_cryptodev_enqueue_burst fail\n");
-			return TEST_FAILED;
-		}
+	}
+
+	k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
+			ut_params->cop, BURST_SIZE);
+	if (k != BURST_SIZE) {
+		RTE_LOG(ERR, USER1,
+			"rte_cryptodev_enqueue_burst fail k=%u\n", k);
+		return TEST_FAILED;
 	}
 
 	if (crypto_dequeue_burst(BURST_SIZE) == TEST_FAILED)
@@ -1012,12 +1013,14 @@ crypto_ipsec_4grp_check_cnt(uint32_t grp_ind, struct rte_ipsec_group *grp)
 	return rc;
 }
 
+#define GRP_4	4
+
 static int
 crypto_ipsec_2sa_4grp(void)
 {
 	struct ipsec_testsuite_params *ts_params = &testsuite_params;
 	struct ipsec_unitest_params *ut_params = &unittest_params;
-	struct rte_ipsec_group grp[BURST_SIZE];
+	struct rte_ipsec_group grp[GRP_4];
 	uint32_t k, ng, i, j;
 	uint32_t rc = 0;
 
@@ -1032,13 +1035,14 @@ crypto_ipsec_2sa_4grp(void)
 				"rte_ipsec_pkt_crypto_prepare fail\n");
 			return TEST_FAILED;
 		}
-		k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
-				ut_params->cop + i, 1);
-		if (k != 1) {
-			RTE_LOG(ERR, USER1,
-				"rte_cryptodev_enqueue_burst fail\n");
-			return TEST_FAILED;
-		}
+	}
+
+	k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
+			ut_params->cop, BURST_SIZE);
+	if (k != BURST_SIZE) {
+		RTE_LOG(ERR, USER1,
+			"rte_cryptodev_enqueue_burst fail k=%u\n", k);
+		return TEST_FAILED;
 	}
 
 	if (crypto_dequeue_burst(BURST_SIZE) == TEST_FAILED)
-- 
2.7.4


             reply	other threads:[~2019-05-22 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 13:38 Bernard Iremonger [this message]
2019-05-22 13:38 ` [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 3/5] test/ipsec: reorder tests Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 4/5] test/ipsec: add extra test configuration Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13 Bernard Iremonger

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=1558532302-15932-1-git-send-email-bernard.iremonger@intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).