DPDK patches and discussions
 help / color / mirror / Atom feed
From: Levend Sayar <levendsayar@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Junfeng Guo <junfeng.guo@intel.com>, dev@dpdk.org
Subject: Re: [PATCH 2/2] net/gve: add standard and extended statistics
Date: Fri, 10 Feb 2023 20:25:41 +0300	[thread overview]
Message-ID: <20DC6215-2930-43A4-8C9A-8B8B90D8F43F@gmail.com> (raw)
In-Reply-To: <20230210083457.0e20a310@hermes.local>

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@networkplumber.org> wrote:
> 
> On Fri, 10 Feb 2023 16:06:06 +0300
> Levend Sayar <levendsayar@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	other threads:[~2023-02-10 17:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 13:06 Levend Sayar
2023-02-10 16:34 ` Stephen Hemminger
2023-02-10 17:25   ` Levend Sayar [this message]
2023-02-10 20:14     ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20DC6215-2930-43A4-8C9A-8B8B90D8F43F@gmail.com \
    --to=levendsayar@gmail.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).