Skip to contentSkip to conversation

pdump: fix log message to display correct error number

PATCH Applied Reshma Pattan 4 participants 4 messages Nov 10, 2016 – Nov 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pdump: fix log message to display correct error number

The ethdev Rx/Tx remove callback apis doesn't set rte_errno during failures, instead they just return negative error number, so using that number in logs instead of rte_errno upon Rx and Tx callback removal failures.

Fixes 278f9454 ("pdump: add new library for packet capture")
---
 lib/librte_pdump/rte_pdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pdump/rte_pdump.c +2 -2
index 504a1ce..5968683 100644
@@ -269,7 +269,7 @@ pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
 			if (ret < 0) {
 				RTE_LOG(ERR, PDUMP,
 					"failed to remove rx callback, errno=%d\n",
-					rte_errno);
+					-ret);
 				return ret;
 			}
 			cbs->cb = NULL;
@@ -324,7 +324,7 @@ pdump_regitser_tx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
 			if (ret < 0) {
 				RTE_LOG(ERR, PDUMP,
 					"failed to remove tx callback, errno=%d\n",
-					rte_errno);
+					-ret);
 				return ret;
 			}
 			cbs->cb = NULL;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Reshma Pattan
Sent: Thursday, November 10, 2016 4:30 PM
To: [email protected]
Cc: Reshma Pattan <[email protected]>
Subject: [dpdk-dev] [PATCH] pdump: fix log message to display correct error number

Quoted 8 lines

The ethdev Rx/Tx remove callback apis doesn't set rte_errno during failures, instead they just return negative error number, so using that number in logs instead of rte_errno upon Rx and Tx callback removal failures.

Fixes 278f9454 ("pdump: add new library for packet capture")
Acked-by on v1 1/1
#2 lore raw
In reply to Reshma Pattan
Quoted 10 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Reshma Pattan
Sent: Thursday, November 10, 2016 4:30 PM
To: [email protected]
Cc: Reshma Pattan
Subject: [dpdk-dev] [PATCH] pdump: fix log message to display correct error number

Quoted 8 lines

The ethdev Rx/Tx remove callback apis doesn't set rte_errno during failures, instead they just return negative error number, so using that number in logs instead of rte_errno upon Rx and Tx callback removal failures.

Fixes 278f9454 ("pdump: add new library for packet capture")
#3 lore raw
Quoted 10 lines
Quoted 8 lines

The ethdev Rx/Tx remove callback apis doesn't set rte_errno during failures, instead they just return negative error number, so using that number in logs instead of rte_errno upon Rx and Tx callback removal failures.

Fixes 278f9454 ("pdump: add new library for packet capture")

Applied, thanks