[dpdk-dev] [PATCH v4 8/8] app: add a new app proc_info

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Jul 9 03:39:35 CEST 2015


2015-07-05 18:40, Maryam Tahhan:
> proc_info displays statistics information including extened stats for

typo: extended

> given DPDK ports and dumps the memory information for DPDK.
> 
> Signed-off-by: Maryam Tahhan <maryam.tahhan at intel.com>
> ---
>  MAINTAINERS            |   4 +
>  app/Makefile           |   1 +
>  app/proc_info/Makefile |  45 +++++
>  app/proc_info/main.c   | 512 +++++++++++++++++++++++++++++++++++++++++++++++++
>  mk/rte.sdktest.mk      |   4 +-
>  5 files changed, 564 insertions(+), 2 deletions(-)

A doc would be useful.

> +DIRS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += proc_info

Why only Linux?

> +#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.

Too old :)

> +	if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) {
> +		printf("  RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes:  "
> +		       "%-"PRIu64"\n",
> +		       stats.ipackets, stats.imissed, stats.ibytes);
> +		printf("  RX-badcrc:  %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: "
> +		       "%-"PRIu64"\n",
> +		       stats.ibadcrc, stats.ibadlen, stats.ierrors);
> +		printf("  RX-nombuf:  %-10"PRIu64"\n",
> +		       stats.rx_nombuf);
> +		printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
> +		       "%-"PRIu64"\n",
> +		       stats.opackets, stats.oerrors, stats.obytes);
> +	} else {
> +		printf("  RX-packets:              %10"PRIu64"    RX-errors: %10"PRIu64
> +		       "    RX-bytes: %10"PRIu64"\n",
> +		       stats.ipackets, stats.ierrors, stats.ibytes);
> +		printf("  RX-badcrc:               %10"PRIu64"    RX-badlen: %10"PRIu64
> +		       "  RX-errors:  %10"PRIu64"\n",
> +		       stats.ibadcrc, stats.ibadlen, stats.ierrors);
> +		printf("  RX-nombuf:               %10"PRIu64"\n",
> +		       stats.rx_nombuf);
> +		printf("  TX-packets:              %10"PRIu64"    TX-errors: %10"PRIu64
> +		       "    TX-bytes: %10"PRIu64"\n",
> +		       stats.opackets, stats.oerrors, stats.obytes);
> +	}

Why the formatting is different depending of device-specific stats mapping?

> +	if (port->rx_queue_stats_mapping_enabled) {
> +		printf("\n");
> +		for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
> +			printf("  Stats reg %2d RX-packets: %10"PRIu64
> +			       "    RX-errors: %10"PRIu64
> +			       "    RX-bytes: %10"PRIu64"\n",
> +			       i, stats.q_ipackets[i], stats.q_errors[i], stats.q_ibytes[i]);
> +		}
> +	}

Why restricting stats per queue to devices requiring a mapping?

> -		$(RTE_OUTPUT)/app/dump_cfg --file-prefix=ring_perf ; \

This should have been removed in previous patch.



More information about the dev mailing list