summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-10-30 18:44:09 +0000
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-11-02 12:29:53 +0100
commitc4160d303026ed11707e4a3a7a2e12b9be863d5a (patch)
treec81b8b937626e023256bd53b04b8fa145ac64a33 /examples
parent2fbdf8348a0ea5af1ae9b982e6fcdc2c8cf9100f (diff)
downloaddpdk-c4160d303026ed11707e4a3a7a2e12b9be863d5a.zip
dpdk-c4160d303026ed11707e4a3a7a2e12b9be863d5a.tar.gz
dpdk-c4160d303026ed11707e4a3a7a2e12b9be863d5a.tar.xz
examples/ip_pipeline: fix port and table stats read
Fix the pipeline port and table stats read operation. Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands") Cc: stable@dpdk.org Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ip_pipeline/thread.c6
1 files 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 */