[v3,1/3] app/testpmd: show errno along with flow API errors

Message ID 20180917074735.28161-1-gavin.hu@arm.com (mailing list archive)
State Superseded, archived
Headers
Series [v3,1/3] app/testpmd: show errno along with flow API errors |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Gavin Hu Sept. 17, 2018, 7:47 a.m. UTC
  From: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 92686a05f..a0f934932 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1346,11 +1346,12 @@  port_flow_complain(struct rte_flow_error *error)
 		errstr = "unknown type";
 	else
 		errstr = errstrlist[error->type];
-	printf("Caught error type %d (%s): %s%s\n",
+	printf("Caught error type %d (%s): %s%s: %s\n",
 	       error->type, errstr,
 	       error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ",
 					error->cause), buf) : "",
-	       error->message ? error->message : "(no stated reason)");
+	       error->message ? error->message : "(no stated reason)",
+	       rte_strerror(err));
 	return -err;
 }