[PATCH 2/2] net/gve: add standard and extended statistics
Levend Sayar
levendsayar at gmail.com
Fri Feb 10 18:25:41 CET 2023
Accessing a stack variable is faster.
So copying to given stats pointer will be done at once.
But of course, given stats pointer can also be used.
> On 10 Feb 2023, at 19:34, Stephen Hemminger <stephen at networkplumber.org> wrote:
>
> On Fri, 10 Feb 2023 16:06:06 +0300
> Levend Sayar <levendsayar at gmail.com> wrote:
>
>> +gve_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>> +{
>> + uint16_t i;
>> + struct rte_eth_stats tmp;
>> +
>> + memset(&tmp, 0, sizeof(tmp))
>
> Why do you need tmp?
> The stats pointer passed in is already available and zeroed.
More information about the dev
mailing list