Skip to contentSkip to conversation

app/testpmd: show errno along with flow API errors

PATCH Applied Adrien Mazarguil 2 participants 3 messages Aug 31, 2018 – Sep 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: show errno along with flow API errors

---
 app/test-pmd/config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
app/test-pmd/config.c +3 -2
index 669be168b..84e817ff2 100644
@@ -1048,11 +1048,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;
 }
 
Signature · 1 line
2.11.0