29/10/2019 16:37, [email protected]:
> From: Pavan Nikhilesh <[email protected]>
> --- 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
> +{
> + 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.