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 07815A05D3 for ; Wed, 22 May 2019 15:39:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7B3C5F0F; Wed, 22 May 2019 15:38:46 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D8CB75F0F for ; Wed, 22 May 2019 15:38:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 06:38:44 -0700 X-ExtLoop1: 1 Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2019 06:38:43 -0700 From: Bernard Iremonger To: dev@dpdk.org, konstantin.ananyev@intel.com, akhil.goyal@nxp.com Cc: Bernard Iremonger Date: Wed, 22 May 2019 14:38:22 +0100 Message-Id: <1558532302-15932-5-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1558532302-15932-1-git-send-email-bernard.iremonger@intel.com> References: <1558532302-15932-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Dump invalid mbuf data in case of error in tests 12 and 13 Signed-off-by: Bernard Iremonger --- app/test/test_ipsec.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index b99e5f0..5d668cd 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -915,7 +915,7 @@ crypto_ipsec_2sa(void) ut_params->obuf, grp, BURST_SIZE); if (ng != BURST_SIZE) { RTE_LOG(ERR, USER1, "rte_ipsec_pkt_crypto_group fail ng=%d\n", - ng); + ng); return TEST_FAILED; } @@ -923,7 +923,15 @@ crypto_ipsec_2sa(void) for (i = 0; i < ng; i++) { k = rte_ipsec_pkt_process(grp[i].id.ptr, grp[i].m, grp[i].cnt); if (k != grp[i].cnt) { - RTE_LOG(ERR, USER1, "rte_ipsec_pkt_process fail\n"); + RTE_LOG(ERR, USER1, + "after rte_ipsec_pkt_process grp[%d].cnt=%d k=%d fail\n", + i, grp[i].cnt, k); + RTE_LOG(ERR, USER1, + "after rte_ipsec_pkt_process grp[%d].m=%p grp[%d].m[0]=%p\n", + i, grp[i].m, i, grp[i].m[0]); + + rte_pktmbuf_dump(stdout, grp[i].m[0], + grp[i].m[0]->data_len); return TEST_FAILED; } } @@ -1061,7 +1069,14 @@ crypto_ipsec_2sa_4grp(void) for (i = 0; i < ng; i++) { k = rte_ipsec_pkt_process(grp[i].id.ptr, grp[i].m, grp[i].cnt); if (k != grp[i].cnt) { - RTE_LOG(ERR, USER1, "rte_ipsec_pkt_process fail\n"); + RTE_LOG(ERR, USER1, + "rte_ipsec_pkt_process grp[%d].cnt=%d k=%d fail\n", + i, grp[i].cnt, k); + RTE_LOG(ERR, USER1, + "rte_ipsec_pkt_process grp[%d].m=%p grp[%d].m[%d]=%p\n", + i, grp[i].m, i, k, grp[i].m[k]); + rte_pktmbuf_dump(stdout, grp[i].m[k], + grp[i].m[k]->data_len); return TEST_FAILED; } rc = crypto_ipsec_4grp_check_cnt(i, grp); -- 2.7.4