From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B0A80A05D3 for ; Wed, 22 May 2019 15:19:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7693110BD; Wed, 22 May 2019 15:19:04 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 09AAB10BD for ; Wed, 22 May 2019 15:19:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 06:18:59 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga008.jf.intel.com with ESMTP; 22 May 2019 06:18:58 -0700 Received: from sivswdev08.ir.intel.com (sivswdev08.ir.intel.com [10.237.217.47]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x4MDIwph026275; Wed, 22 May 2019 14:18:58 +0100 Received: from sivswdev08.ir.intel.com (localhost [127.0.0.1]) by sivswdev08.ir.intel.com with ESMTP id x4MDIvbE007028; Wed, 22 May 2019 14:18:57 +0100 Received: (from bairemon@localhost) by sivswdev08.ir.intel.com with LOCAL id x4MDIvua007024; Wed, 22 May 2019 14:18:57 +0100 From: Bernard Iremonger To: qabuild@intel.com Cc: Bernard Iremonger , stable@dpdk.org Date: Wed, 22 May 2019 14:18:51 +0100 Message-Id: <1558531135-6651-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-stable] [DPDK 1/5] test/ipsec: fix failures in tests 12 and 13 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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