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

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Thu Oct 31 17:44:36 CET 2019


>29/10/2019 16:37, pbhagavatula at marvell.com:
>> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>> --- a/lib/librte_ethdev/rte_ethdev.c
>> +++ b/lib/librte_ethdev/rte_ethdev.c
>> +static int
>> +_rte_eth_dev_validate_offloads(uint16_t port_id, uint64_t
>req_offloads,
>> +			       uint64_t set_offloads,
>> +			       const char *(*f)(uint64_t))
>
>Please do not call "f" a function parameter.
>This function has a purpose, please name it.
>
>Overall, I feel it would be easier to understand this function
>with a comment on top, explaining each parameter. Thanks

Will fix in v16.

>
>> +{
>> +	uint64_t offloads_diff = req_offloads ^ set_offloads;
>> +	uint64_t offloads_req_diff, offloads_set_diff;
>> +	uint64_t offload;
>> +	uint8_t err = 0;
>> +
>> +	/* Check if any offload is advertised but not enabled. */
>
>Not sure "advertised" is the right word here.

Don't PMDs advertise their capabilities/offloads through dev_info?.

>
>



More information about the dev mailing list