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

Reply via email to