All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>
Cc: Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>,
	Thomas Monjalon <thomas@monjalon.net>, <dev@dpdk.org>
Subject: Re: [RFC] ethdev: simplify representor info get API
Date: Mon, 31 Aug 2026 09:46:54 -0700	[thread overview]
Message-ID: <20260831094654.2cd73523@phoenix.local> (raw)
In-Reply-To: <20260831162905.383162-1-dsosnowski@nvidia.com>

On Mon, 31 Aug 2026 18:29:05 +0200
Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:

> * Background on rte_eth_representor_info_get()
> 
> rte_eth_representor_info_get() experimental function was added
> to ethdev public API in 21.05 DPDK release [1].

You know the API shouldn't have stayed experimental so long.
There is no good reason for API to stay experimental across multiple LTS releases!

The code would be much simpler if you use sentinel values rather than
carrying around all the XX_valid flag values.

With int fields and -1 (or a named RTE_ETH_REPRESENTOR_UNSPEC),
 the whole comparator collapses to something like:


static bool field_match(int a, int b)
{
	return a == -1 || b == -1 || a == b;
}

return field_match(info.controller, other->controller) &&
       field_match(info.pf, other->pf) &&
       info.type == other->type &&
       (info.type != RTE_ETH_REPRESENTOR_VF || field_match(info.vf, other->vf)) &&

  reply	other threads:[~2026-08-31 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 16:29 [RFC] ethdev: simplify representor info get API Dariusz Sosnowski
2026-08-31 16:46 ` Stephen Hemminger [this message]
2026-09-07 15:31   ` Dariusz Sosnowski

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=20260831094654.2cd73523@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=hkalra@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=matan@nvidia.com \
    --cc=ndabilpuram@marvell.com \
    --cc=orika@nvidia.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.