app/testpmd: show errno along with flow API errors
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Fri, 31 Aug 2018 09:10:56 +0000 (11:10 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 14 Sep 2018 18:08:41 +0000 (20:08 +0200)
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/config.c

index 92686a0..a0f9349 100644 (file)
@@ -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;
 }