X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Fproc_info%2Fmain.c;h=d4f6a8236e3fd448ee313a0da28dd5756b2ae550;hb=bd279a79366f50a4893fb84db91bbf64b56f9fb1;hp=9c9b2b542fbcf6adebc16400a116e771eafe8de6;hpb=1223608adb9bab11c5a03107d868daa2ac6f90fb;p=dpdk.git diff --git a/app/proc_info/main.c b/app/proc_info/main.c index 9c9b2b542f..d4f6a8236e 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -107,7 +107,7 @@ proc_info_usage(const char *prgname) "default\n" " --metrics: to display derived metrics of the ports, disabled by " "default\n" - " --xstats-name NAME: to display single xstat value by NAME\n" + " --xstats-name NAME: to display single xstat id by NAME\n" " --xstats-ids IDLIST: to display xstat values by id. " "The argument is comma-separated list of xstat ids to print out.\n" " --stats-reset: to reset port statistics\n" @@ -434,7 +434,7 @@ nic_xstats_by_ids_display(uint8_t port_id, uint64_t *ids, int len) int ret, i; static const char *nic_stats_border = "########################"; - values = malloc(sizeof(values) * len); + values = malloc(sizeof(*values) * len); if (values == NULL) { printf("Cannot allocate memory for xstats\n"); return; @@ -447,7 +447,7 @@ nic_xstats_by_ids_display(uint8_t port_id, uint64_t *ids, int len) return; } - if (len != rte_eth_xstats_get_names( + if (len != rte_eth_xstats_get_names_by_id( port_id, xstats_names, len, ids)) { printf("Cannot get xstat names\n"); goto err; @@ -456,7 +456,7 @@ nic_xstats_by_ids_display(uint8_t port_id, uint64_t *ids, int len) printf("###### NIC extended statistics for port %-2d #########\n", port_id); printf("%s############################\n", nic_stats_border); - ret = rte_eth_xstats_get(port_id, ids, values, len); + ret = rte_eth_xstats_get_by_id(port_id, ids, values, len); if (ret < 0 || ret > len) { printf("Cannot get xstats\n"); goto err; @@ -481,12 +481,12 @@ nic_xstats_display(uint8_t port_id) int len, ret, i; static const char *nic_stats_border = "########################"; - len = rte_eth_xstats_get_names(port_id, NULL, 0, NULL); + len = rte_eth_xstats_get_names_by_id(port_id, NULL, 0, NULL); if (len < 0) { printf("Cannot get xstats count\n"); return; } - values = malloc(sizeof(values) * len); + values = malloc(sizeof(*values) * len); if (values == NULL) { printf("Cannot allocate memory for xstats\n"); return; @@ -498,7 +498,7 @@ nic_xstats_display(uint8_t port_id) free(values); return; } - if (len != rte_eth_xstats_get_names( + if (len != rte_eth_xstats_get_names_by_id( port_id, xstats_names, len, NULL)) { printf("Cannot get xstat names\n"); goto err; @@ -508,7 +508,7 @@ nic_xstats_display(uint8_t port_id) port_id); printf("%s############################\n", nic_stats_border); - ret = rte_eth_xstats_get(port_id, NULL, values, len); + ret = rte_eth_xstats_get_by_id(port_id, NULL, values, len); if (ret < 0 || ret > len) { printf("Cannot get xstats\n"); goto err;