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 <step...@networkplumber.org> 
> wrote:
> 
> On Fri, 10 Feb 2023 16:06:06 +0300
> Levend Sayar <levendsa...@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.

Reply via email to