[dpdk-dev] [PATCH v15 3/7] ethdev: add validation to offloads set by PMD

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Thu Oct 31 16:18:58 CET 2019


Hi Matan,

>Hi Pavan
>
>From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>> Some PMDs cannot work when certain offloads are enable/disabled,
>as a
>> workaround PMDs auto enable/disable offloads internally and expose
>it
>> through dev->data->dev_conf.rxmode.offloads.
>>
>> After device specific dev_configure is called compare the requested
>offloads
>> to the offloads exposed by the PMD and, if the PMD failed to enable a
>given
>> offload then log it and return -EINVAL from rte_eth_dev_configure,
>else if
>> the PMD failed to disable a given offload log and continue with
>> rte_eth_dev_configure.
>>
>
>rte_eth_dev_configure can be called more than 1 time in the device life
>time,
>How can you know what is the minimum offload configurations
>required by the port after the first call?
>Maybe putting it in dev info is better, what do you think?
>

We only return -EINVAL in the case where we enable an offload advertised by 
dev_info and the port still fails to enable it.

>Matan


More information about the dev mailing list