app/testpmd: show errno along with flow API errors

Message ID 20180831090850.22357-1-adrien.mazarguil@6wind.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • app/testpmd: show errno along with flow API errors
Related show

Checks

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

Commit Message

Adrien Mazarguil Aug. 31, 2018, 9:10 a.m.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 app/test-pmd/config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Ferruh Yigit Sept. 14, 2018, 2:27 p.m. | #1
On 8/31/2018 10:10 AM, Adrien Mazarguil wrote:
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit Sept. 14, 2018, 2:28 p.m. | #2
On 9/14/2018 3:27 PM, Ferruh Yigit wrote:
> On 8/31/2018 10:10 AM, Adrien Mazarguil wrote:
>> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 669be168b..84e817ff2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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;
 }