DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Min Hu (Connor)" <humin29@huawei.com>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <thomas@monjalon.net>,
	<maryam.tahhan@intel.com>, <reshma.pattan@intel.com>
Subject: Re: [PATCH] app/procinfo: add device private info dump
Date: Sat, 19 Feb 2022 17:04:43 -0800	[thread overview]
Message-ID: <20220219170443.074e608f@hermes.local> (raw)
In-Reply-To: <20220219015916.46347-1-humin29@huawei.com>

On Sat, 19 Feb 2022 09:59:16 +0800
"Min Hu (Connor)" <humin29@huawei.com> wrote:

> +static void
> +show_port_private_info(void)
> +{
> +	int i;
> +
> +	snprintf(bdr_str, MAX_STRING_LEN, " show - Port PMD Private ");
> +	STATS_BDR_STR(10, bdr_str);
> +
> +	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
> +		/* Skip if port is not in mask */
> +		if ((enabled_port_mask & (1ul << i)) == 0)
> +			continue;
> +
> +		/* Skip if port is unused */
> +		if (!rte_eth_dev_is_valid_port(i))
> +			continue;

Maybe use RTE_ETH_FOREACH_DEV(i) here?

Procinfo is somewhat inconsistent, some code uses, and some does not.
The difference is that FOREACH skips ports that are "owned" i.e
associated with another port.

There probably should be a clear policy in the comments about
how this command should handle ports.  My preference would be
that it shows all valid ports, all the time since this is a diagnostic
command used to debug misconfiguration. 

There is RTE_ETH_FOREACH_VALID_DEV but it is marked internal?

  reply	other threads:[~2022-02-20  1:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19  1:59 Min Hu (Connor)
2022-02-20  1:04 ` Stephen Hemminger [this message]
2022-02-20  8:56   ` Thomas Monjalon
2022-02-21  2:26     ` Min Hu (Connor)
2022-02-21 17:04       ` Stephen Hemminger
2022-02-22  0:40         ` Min Hu (Connor)
2022-02-21  2:24 ` [PATCH v2] app/procinfo: add devcie " Min Hu (Connor)
2022-04-07  8:09   ` Min Hu (Connor)
2022-04-18  1:11     ` Min Hu (Connor)
2022-04-25  6:44     ` Min Hu (Connor)
2022-05-21  6:54   ` Min Hu (Connor)
2022-05-23  8:43     ` Ferruh Yigit
2022-05-25 14:33   ` Pattan, Reshma
2022-05-26  6:01     ` Min Hu (Connor)
2022-05-26  1:10   ` [PATCH v3] app/procinfo: add device " Min Hu (Connor)
2022-06-02  6:22 ` Min Hu (Connor)
2022-06-06 14:39   ` [PATCH v4] " Dongdong Liu
2022-06-13 12:45     ` Dongdong Liu
2022-06-13 12:51       ` Dongdong Liu
2022-06-26 15:50     ` Thomas Monjalon
2022-07-02  8:22       ` Dongdong Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220219170443.074e608f@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=maryam.tahhan@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).