From patchwork Thu Nov 10 16:29:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pattan, Reshma" X-Patchwork-Id: 16994 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 006C7D4B0; Thu, 10 Nov 2016 17:30:01 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 03A25D4AA for ; Thu, 10 Nov 2016 17:29:58 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 10 Nov 2016 08:29:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,619,1473145200"; d="scan'208"; a="1057921913" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by orsmga001.jf.intel.com with ESMTP; 10 Nov 2016 08:29:42 -0800 From: Reshma Pattan To: dev@dpdk.org Cc: Reshma Pattan Date: Thu, 10 Nov 2016 16:29:40 +0000 Message-Id: <1478795380-16975-1-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] pdump: fix log message to display correct error number X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Signed-off-by: Reshma Pattan Acked-by: John McNamara Acked-by: Pablo de Lara --- lib/librte_pdump/rte_pdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index 504a1ce..5968683 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -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;