From: Cristian Dumitrescu Date: Tue, 30 Oct 2018 18:44:09 +0000 (+0000) Subject: examples/ip_pipeline: fix port and table stats read X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c4160d303026ed11707e4a3a7a2e12b9be863d5a;p=dpdk.git 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 Signed-off-by: Jasvinder Singh Signed-off-by: Hongjun Ni --- diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index e1b6fb684b..272fbbeed1 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 */