All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Sztyber <konrad.sztyber@gmail.com>
To: chenbox@nvidia.com, dev@dpdk.org
Subject: Re: [PATCH v3] bus/pci: don't open uio device in secondary process
Date: Tue, 13 Jan 2026 13:17:20 +0100	[thread overview]
Message-ID: <16c82143-3828-4ede-ab19-fe2e908e2190@gmail.com> (raw)
In-Reply-To: <B7194C63-9B63-4E74-876F-C0B83CD113FA@nvidia.com>

On 9/22/25 10:22 AM, chenbox at nvidia.com (Chenbo Xia) wrote:
>> +static int
>> +pci_uio_send_fd(const struct rte_mp_msg *request, const void *peer)
>> +{
>> +       struct rte_pci_device *dev;
>> +       const struct pci_uio_send_fd_param *param =
>> +               (const struct pci_uio_send_fd_param *)request->param;
>> +       struct rte_mp_msg reply = {};
>> +       int fd;
>> +
>> +       strlcpy(reply.name, request->name, sizeof(reply.name));
>> +       TAILQ_FOREACH(dev, &rte_pci_bus.device_list, next) {
>> +               if (!rte_pci_addr_cmp(&dev->addr, &param->addr))
>> +                       break;
>> +       }
>> +
>> +       if (dev == NULL) {
>> +               PCI_LOG(ERR, "Could not find PCI device (" PCI_PRI_FMT ")",
>> +                       param->addr.domain, param->addr.bus,
>> +                       param->addr.devid, param->addr.function);
>> +               goto reply;
>> +       }
>> +
>> +       fd = rte_intr_fd_get(dev->intr_handle);
>> +       if (fd < 0) {
>> +               PCI_LOG(ERR, "Could not get fd (" PCI_PRI_FMT ")",
>> +                       param->addr.domain, param->addr.bus,
>> +                       param->addr.devid, param->addr.function);
>> +               goto reply;
>> +       }
> Should we just return error instead of calling rte_mp_reply when dev == NULL or fd < 0?

We could, but that means that we won't send any response to the 
secondary process, so it'll timeout. I figured it's better to return a 
response with num_fds = 0 to let it fail immediately.

Konrad


  reply	other threads:[~2026-01-13 12:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 10:40 [PATCH] bus/pci: don't open uio device in secondary process Konrad Sztyber
2024-08-29  5:53 ` Chaoyong He
2024-08-29  8:06 ` Chenbo Xia
2024-08-29  8:57 ` [PATCH v2] " Konrad Sztyber
2024-08-30  3:48   ` Chenbo Xia
2024-10-11 11:15   ` [PATCH v3] " Konrad Sztyber
2024-10-24  9:05     ` David Marchand
2024-11-19 10:39       ` Konrad Sztyber
2025-09-19 10:15     ` David Marchand
2026-01-13 12:14       ` Konrad Sztyber
2025-09-22  8:22     ` Chenbo Xia
2026-01-13 12:17       ` Konrad Sztyber [this message]
2026-01-13 12:35     ` [PATCH v4] " Konrad Sztyber
2026-01-13 14:31       ` Stephen Hemminger
2024-10-07 17:49 ` [PATCH] " Stephen Hemminger
2024-10-09 10:11   ` Konrad Sztyber
2024-10-09 15:12     ` Stephen Hemminger
2024-10-11  6:38       ` Konrad Sztyber
2024-10-11  6:46         ` David Marchand

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=16c82143-3828-4ede-ab19-fe2e908e2190@gmail.com \
    --to=konrad.sztyber@gmail.com \
    --cc=B7194C63-9B63-4E74-876F-C0B83CD113FA@nvidia.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.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 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.