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>
Subject: [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13
Date: Wed, 22 May 2019 14:38:22 +0100	[thread overview]
Message-ID: <1558532302-15932-5-git-send-email-bernard.iremonger@intel.com> (raw)
In-Reply-To: <1558532302-15932-1-git-send-email-bernard.iremonger@intel.com>

Dump invalid mbuf data in case of error in tests 12 and 13

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 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


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures " Bernard Iremonger
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 ` Bernard Iremonger [this message]

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-5-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 \
    /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).