DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Gregory Etelson <getelson@nvidia.com>
Cc: <dev@dpdk.org>, <mkashani@nvidia.com>, <rasland@nvidia.com>,
	<thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH v3 1/2] ethdev: make representor parameter more explicit
Date: Wed, 5 Nov 2025 11:20:39 -0800	[thread overview]
Message-ID: <20251105112039.1db64906@phoenix> (raw)
In-Reply-To: <20251105174839.323085-1-getelson@nvidia.com>

Looks good as is, a couple of minor observations.

> +	/* pfX... or (pfX)... */
> +	if ((str[0] == 'p' && str[1] == 'f') ||
> +	    (str[0] == '(' && str[1] == 'p' && str[2] == 'f')) {

This is correct but seem like it is getting verbose.
If there are more cases than this looking for prefix, might be
useful to have helper function.

Looks like devargs could use some better pattern matching,
lots of string handling already in this code.
String processing in C is often an error trap.

> +		if (str != NULL && str[0] == ')') {
> +			str++; /* advance past ")" */
> +			eth_da->flags =
> +				RTE_ETH_DEVARG_IGNORE_PF_REPRESENTOR;

Can't that go on one line, max line length in DPDK is 100.
Is there a case where there could be multiple devargs flags?




  parent reply	other threads:[~2025-11-05 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  9:58 [PATCH " Gregory Etelson
2025-10-28  9:58 ` [PATCH 2/2] net/mlx5: support PF representor suppresion in multi-port E-Switch Gregory Etelson
2025-11-05 17:37 ` [PATCH v2 1/2] ethdev: make representor parameter more explicit Gregory Etelson
2025-11-05 17:37   ` [PATCH v2 2/2] net/mlx5: support PF representor suppresion in multi-port E-Switch Gregory Etelson
2025-11-05 17:48 ` [PATCH v3 1/2] ethdev: make representor parameter more explicit Gregory Etelson
2025-11-05 17:48   ` [PATCH v3 2/2] net/mlx5: support PF representor suppression in multi-port E-Switch Gregory Etelson
2025-11-05 19:20   ` Stephen Hemminger [this message]
2025-11-05 21:17     ` [PATCH v3 1/2] ethdev: make representor parameter more explicit Thomas Monjalon

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=20251105112039.1db64906@phoenix \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=mkashani@nvidia.com \
    --cc=rasland@nvidia.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).