[dpdk-dev] [PATCH v2 2/2] ethdev: introduce Tx queue offloads API

Andrew Rybchenko arybchenko at solarflare.com
Mon Sep 11 15:10:07 CEST 2017


On 09/11/2017 03:27 PM, Shahaf Shuler wrote:
>
> September 11, 2017 11:03 AM, Andrew Rybchenko:
>
>     +/**
>
>     + * A conversion function from txq_flags API.
>
>     + */
>
>     +static void
>
>     +rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads)
>
>
> Maybe tx_offlaods should be simply return value of the function 
> instead of void.
> Similar comment is applicable to rte_eth_convert_txq_offloads().
>
> Can you elaborate why it would be better?
>

It is a pure converter function and it would avoid questions like:
Is tx_offloads an output only or input/output parameter?
Yes, the function is tiny and it is easy to find the answer, but still.

Also it would make it possible to pass the result to other function
call without extra variables etc.
Yes, right now usage of the function is very limited and hopefully
it will not live long, so it is not that important. Definitely up to you.



More information about the dev mailing list