DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Yuanhan Liu <yliu@fridaylinux.org>,
	Shani Peretz <shperetz@nvidia.com>
Subject: Re: [PATCH] ethdev: allow using devices with shortened PCI addresses
Date: Tue, 19 Nov 2024 16:29:26 +0000	[thread overview]
Message-ID: <Zzy85lYt2N0BEIb_@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <4711627.CvnuH1ECHv@thomas>

On Tue, Nov 19, 2024 at 05:22:21PM +0100, Thomas Monjalon wrote:
> 19/11/2024 16:57, Bruce Richardson:
> > When using a secondary process, e.g. pdump, not all PCI devices will be
> > probed correctly if the primary process has allowlisted devices using
> > the shortened syntax, omitting the initial "0000:" domain. This is due
> > to the strcmp failing to match a full address with a shortened one.
> > 
> > Fix this issue by comparing the device names/addresses normally and then
> > having a special case second comparison for devices which start with
> > "0000:".
> > 
> > Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  lib/ethdev/ethdev_driver.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
> > index 9afef06431..e5590076c1 100644
> > --- a/lib/ethdev/ethdev_driver.c
> > +++ b/lib/ethdev/ethdev_driver.c
> > +		/* for PCI devices, allow specifying name without a leading "0000:" */
> > +		if (strncmp(name, "0000:", 5) == 0 && /* is PCI address */
> > +				strcmp(eth_dev_shared_data->data[i].name, &name[5]) == 0)
> > +			break;
> 
> I'm afraid it is not enough in all cases.
> Shani is preparing a patch which uses the same PCI address formatting
> in all cases.
> 
Great. I'll test that patch when it gets submitted.

/Bruce.

      reply	other threads:[~2024-11-19 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 15:57 Bruce Richardson
2024-11-19 16:22 ` Thomas Monjalon
2024-11-19 16:29   ` Bruce Richardson [this message]

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=Zzy85lYt2N0BEIb_@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=shperetz@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yliu@fridaylinux.org \
    /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).