[dpdk-dev] [PATCH v4 1/8] common/sfc_efx/base: add base virtio support for vDPA

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Tue Mar 16 13:14:35 CET 2021


On 3/16/21 2:58 PM, Ferruh Yigit wrote:
> On 3/16/2021 11:47 AM, Andrew Rybchenko wrote:
>> On 3/16/21 2:30 PM, Ferruh Yigit wrote:
>>> On 3/16/2021 8:58 AM, Andrew Rybchenko wrote:
>>>> From: Vijay Srivastava <vijays at solarflare.com>
>>>>
>>>> In the vDPA mode, only data path is offloaded in the hardware and
>>>> control path still goes through the hypervisor and it configures
>>>> virtqueues via vDPA driver so new virtqueue APIs are required.
>>>>
>>>> Implement virtio init/fini and virtqueue create/destroy APIs.
>>>>
>>>> Signed-off-by: Vijay Srivastava <vijays at solarflare.com>
>>>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/common/sfc_efx/efsys.h
>>>> b/drivers/common/sfc_efx/efsys.h
>>>> index 663601412e..d133d61b3d 100644
>>>> --- a/drivers/common/sfc_efx/efsys.h
>>>> +++ b/drivers/common/sfc_efx/efsys.h
>>>> @@ -187,6 +187,8 @@ prefetch_read_once(const volatile void *addr)
>>>>      #define EFSYS_OPT_MAE 1
>>>>    +#define EFSYS_OPT_VIRTIO 0
>>>> +
>>>
>>> Hi Andrew,
>>>
>>> How this 'efsys.h' works, is it compile time configuration file for the
>>> driver?
>>
>> Yes, it is a compile time configuration of the base driver.
>>
>>> Is is expected that users change this file?
>>
>> Client drivers (e.g. net/sfc or vdpa/sfc) change the base
>> driver configuration when it needs corresponding functionality
>> from the base driver. Of course, it is not ideal to add code
>> which is not actually compiled right now, but we always try
>> to ensure that build finally works fine and no extra patches
>> will be required to fix the build when corresponding option
>> is enabled.
>>
>> In theory we can send longer patch series which includes
>> the vdpa/sfc driver, but it will be longer patch series which
>> is harder to chew.
>>
> 
> It is OK to send preparation sets first, that wasn't my point.

I see.

> My concern is having compile time configuration within driver, my
> question is if end user of the driver need to tweak these config
> options, if so should it be more generic way instead of a PMD specific
> way...

No, it is not a user configuration. It is configuration done by
client (net/sfc, vdpa/sfc) drivers which use the common driver.


More information about the dev mailing list