From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AEA871B461 for ; Fri, 2 Nov 2018 12:37:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2018 04:37:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,455,1534834800"; d="scan'208";a="105381823" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga002.jf.intel.com with ESMTP; 02 Nov 2018 04:37:17 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: Jasvinder Singh , Hongjun Ni Date: Fri, 2 Nov 2018 11:37:03 +0000 Message-Id: <1541158623-29742-12-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541158623-29742-1-git-send-email-cristian.dumitrescu@intel.com> References: <1541158623-29742-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 12/12] examples/ip_pipeline: fix port and table stats read X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 11:37:19 -0000 Fix the pipeline port and table stats read operation. Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands") Signed-off-by: Cristian Dumitrescu Signed-off-by: Jasvinder Singh Signed-off-by: Hongjun Ni --- examples/ip_pipeline/thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index e1b6fb6..272fbbe 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -820,7 +820,7 @@ pipeline_port_in_stats_read(const char *pipeline_name, /* Read response */ status = rsp->status; - if (status) + if (status == 0) memcpy(stats, &rsp->port_in_stats_read.stats, sizeof(*stats)); /* Free response */ @@ -968,7 +968,7 @@ pipeline_port_out_stats_read(const char *pipeline_name, /* Read response */ status = rsp->status; - if (status) + if (status == 0) memcpy(stats, &rsp->port_out_stats_read.stats, sizeof(*stats)); /* Free response */ @@ -1024,7 +1024,7 @@ pipeline_table_stats_read(const char *pipeline_name, /* Read response */ status = rsp->status; - if (status) + if (status == 0) memcpy(stats, &rsp->table_stats_read.stats, sizeof(*stats)); /* Free response */ -- 2.7.4