From: "Renyong Wan" <wanry@yunsilicon.com>
To: "Thomas Monjalon" <thomas@monjalon.net>
Cc: <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: Thu, 6 Feb 2025 00:43:46 +0800 [thread overview]
Message-ID: <71be3e4f-6411-48d4-bace-d27be9b94c17@yunsilicon.com> (raw)
In-Reply-To: <3203749.TQGk6oTFT5@thomas>
On 2025/2/5 23:45, Thomas Monjalon wrote:
> 05/02/2025 16:37, Renyong Wan:
>> On 2025/2/5 22:43, Thomas Monjalon wrote:
>>> 05/02/2025 15:37, Renyong Wan:
>>>> On 2025/2/5 19:44, Thomas Monjalon wrote:
>>>>> 28/01/2025 15:46, Renyong Wan:
>>>>>> XSC PMD is designed to support both VFIO and private kernel drivers.
>>>>> What's the benefit of private kernel drivers?
>>>>> Why are they private?
>>>> Hello Thomas,
>>>>
>>>> Thanks for your review.
>>>>
>>>> It can support the bifurcation model without unbinding the kernel
>>>> driver, by utilizing our private kernel driver in conjunction with
>>>> rdma-core. Currently, our kernel driver is not open-source, so it is
>>>> considered a private kernel driver. This patch series only supports the
>>>> VFIO driver. Our kernel driver is currently in the process of being
>>>> open-sourced on kernel.org, and once it is available there, we also plan
>>>> to submit the code that supports our kernel driver to DPDK.
>>> OK that's interesting, thank you.
>>>
>>> I think it would be the first DPDK driver to support both VFIO or bifurcated model.
>>> How will we choose which one to use? With devargs?
>>>
>>>
>> 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.
Thank you.
--
Best regards,
Renyong Wan
next prev parent reply other threads:[~2025-02-05 16:44 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 [this message]
2025-02-05 16:54 ` David Marchand
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=71be3e4f-6411-48d4-bace-d27be9b94c17@yunsilicon.com \
--to=wanry@yunsilicon.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=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).