ethdev: change xstats reset function to return int
[dpdk.git] / app / proc-info / main.c
index 34eb7a7..94e808d 100644 (file)
@@ -580,8 +580,16 @@ err:
 static void
 nic_xstats_clear(uint16_t port_id)
 {
+       int ret;
+
        printf("\n Clearing NIC xstats for port %d\n", port_id);
-       rte_eth_xstats_reset(port_id);
+       ret = rte_eth_xstats_reset(port_id);
+       if (ret != 0) {
+               printf("\n Error clearing xstats for port %d: %s\n", port_id,
+                      strerror(-ret));
+               return;
+       }
+
        printf("\n  NIC extended statistics for port %d cleared\n", port_id);
 }