From: David Marchand <david.marchand@redhat.com>
To: Renyong Wan <wanry@yunsilicon.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
dev@dpdk.org, ferruh.yigit@amd.com, stephen@networkplumber.org,
qianr@yunsilicon.com, nana@yunsilicon.com,
zhangxx@yunsilicon.com, xudw@yunsilicon.com,
jacky@yunsilicon.com, weihg@yunsilicon.com
Subject: Re: [PATCH v7 04/15] net/xsc: add xsc dev ops to support VFIO driver
Date: Wed, 5 Feb 2025 17:54:11 +0100 [thread overview]
Message-ID: <CAJFAV8yYnCP5AKJdPYQ5PcXR4vX135QbOxfqMqKA2hyREf=Y5A@mail.gmail.com> (raw)
In-Reply-To: <71be3e4f-6411-48d4-bace-d27be9b94c17@yunsilicon.com>
On Wed, Feb 5, 2025 at 5:44 PM Renyong Wan <wanry@yunsilicon.com> wrote:
> >> That's how we designed it.
> >> We designed a low-level device operations framework named xsc_dev_ops to
> >> support both VFIO drivers and kernel drivers. Each xsc_dev_ops is
> >> registered before the main function runs. During the PCI device probe
> >> phase, the XSC PMD selects the corresponding xsc_dev_ops based on
> >> rte_pci_device->driver, therefore, there is no need for devargs.
> > I don't understand.
> > If both VFIO and the kernel driver are loaded,
> > we'll scan the device twice?
> > Will it be probed 2 times?
> >
> >
> No, it won't probe twice.
> I suppose that each PCI device will only be bound to either the VFIO
> driver or a kernel driver. The drv_flags of the xsc_pmd PCI driver will
> not preset with RTE_PCI_DRV_NEED_MAPPING. Therefore, in the
> rte_pci_probe_one_driver function, rte_pci_map_device() will not be
> called. After entering the probe phase of the xsc PMD PCI driver,
> rte_pci_map_device() will be called in xsc_dev_ops->init() based on
> whether it is a VFIO driver.
(side note, this means that this driver should probably call
rte_pci_unmap_device() in its release path, though I see none)
--
David Marchand
next prev parent reply other threads:[~2025-02-05 16:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 14:47 [PATCH v7 00/15] XSC PMD for Yunsilicon NICs Renyong Wan
2025-01-28 14:46 ` [PATCH v7 01/15] net/xsc: add xsc PMD framework Renyong Wan
2025-01-28 14:46 ` [PATCH v7 02/15] net/xsc: add xsc device initialization Renyong Wan
2025-01-28 14:46 ` [PATCH v7 03/15] net/xsc: add xsc mailbox Renyong Wan
2025-01-28 14:46 ` [PATCH v7 04/15] net/xsc: add xsc dev ops to support VFIO driver Renyong Wan
2025-02-05 11:44 ` Thomas Monjalon
2025-02-05 14:37 ` Renyong Wan
2025-02-05 14:43 ` Thomas Monjalon
2025-02-05 14:59 ` Bruce Richardson
2025-02-05 15:47 ` Thomas Monjalon
2025-02-05 15:51 ` Bruce Richardson
2025-02-05 15:37 ` Renyong Wan
2025-02-05 15:45 ` Thomas Monjalon
2025-02-05 16:43 ` Renyong Wan
2025-02-05 16:54 ` David Marchand [this message]
2025-01-28 14:46 ` [PATCH v7 05/15] net/xsc: add PCT interfaces Renyong Wan
2025-01-28 14:47 ` [PATCH v7 06/15] net/xsc: initialize xsc representors Renyong Wan
2025-01-28 14:47 ` [PATCH v7 07/15] net/xsc: add ethdev configure and RSS ops Renyong Wan
2025-01-28 14:47 ` [PATCH v7 08/15] net/xsc: add Rx and Tx queue setup Renyong Wan
2025-01-28 14:47 ` [PATCH v7 09/15] net/xsc: add ethdev start Renyong Wan
2025-01-28 14:47 ` [PATCH v7 10/15] net/xsc: add ethdev stop and close Renyong Wan
2025-01-28 14:47 ` [PATCH v7 11/15] net/xsc: add ethdev Rx burst Renyong Wan
2025-01-28 14:47 ` [PATCH v7 12/15] net/xsc: add ethdev Tx burst Renyong Wan
2025-01-28 14:47 ` [PATCH v7 13/15] net/xsc: add basic stats ops Renyong Wan
2025-01-28 14:47 ` [PATCH v7 14/15] net/xsc: add ethdev infos get Renyong Wan
2025-01-28 14:47 ` [PATCH v7 15/15] net/xsc: add ethdev link and MTU ops Renyong Wan
2025-01-28 20:01 ` [PATCH v7 00/15] XSC PMD for Yunsilicon NICs Stephen Hemminger
2025-01-29 13:32 ` WanRenyong
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='CAJFAV8yYnCP5AKJdPYQ5PcXR4vX135QbOxfqMqKA2hyREf=Y5A@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jacky@yunsilicon.com \
--cc=nana@yunsilicon.com \
--cc=qianr@yunsilicon.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=wanry@yunsilicon.com \
--cc=weihg@yunsilicon.com \
--cc=xudw@yunsilicon.com \
--cc=zhangxx@yunsilicon.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).