DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "taoyunxiang@cmss.chinamobile.com" <taoyunxiang@cmss.chinamobile.com>
Cc: dev <dev@dpdk.org>
Subject: Re: Re: [PATCH] bus: fix code unused
Date: Wed, 18 May 2022 14:07:07 +0200	[thread overview]
Message-ID: <CAJFAV8wY-6e4xP6r0s0ZwyJCRpBUd+osbipYC7tRbcnMDp6+kg@mail.gmail.com> (raw)
In-Reply-To: <2022051709543807022424@cmss.chinamobile.com>

On Tue, May 17, 2022 at 3:54 AM taoyunxiang@cmss.chinamobile.com
<taoyunxiang@cmss.chinamobile.com> wrote:
> >> @@ -143,7 +143,7 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
> >>         if (ret)
> >>                 goto err_devarg;
> >>
> >> -       if (da->bus->plug == NULL) {
> >> +       if (da->bus->plug != 0) {
>
>
>
> >The current (before patch) check is correct: it is allowed that a bus
> >does not support hotplug.
> >Inverting this check as you propose breaks hotplug.
>
> "da->bus->plug" will call pci_plug and  pci_probe_all_drivers in pci_common.c , is it right ?

Checking for da->bus->plug value is different from calling da->bus->plug(dev).

>
> The pci_probe_all_drivers will never return NULL,  so the check and related code will not go throuth,
> no matter the plug is ok or not.

This check is needed, and is correct in its current form.


Thanks.

-- 
David Marchand


      reply	other threads:[~2022-05-18 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8>
2022-05-12 12:19 ` taoyunxiang
2022-05-16  7:55   ` David Marchand
2022-05-17  1:54     ` taoyunxiang
2022-05-18 12:07       ` David Marchand [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=CAJFAV8wY-6e4xP6r0s0ZwyJCRpBUd+osbipYC7tRbcnMDp6+kg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=taoyunxiang@cmss.chinamobile.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 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).