DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Qiming Yang <qiming.yang@intel.com>, dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix stats reset
Date: Tue, 23 Apr 2019 11:56:31 +0100	[thread overview]
Message-ID: <471602ea-d632-337a-9de5-c17d31419418@intel.com> (raw)
Message-ID: <20190423105631._COSoa4EaDcWMdHhw3ejakfP7y9uFY6EL2fZ7lKE9Dk@z> (raw)
In-Reply-To: <20190422021837.108028-1-qiming.yang@intel.com>

On 4/22/2019 3:18 AM, Qiming Yang wrote:
> stats_reset has been missed when support stats in iavf driver.
> This patch add statistics reset function.
> 
> Fixes: f4a41a6953af ("net/avf: support stats")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>

<...>

> @@ -977,16 +979,71 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
>  	return 0;
>  }
>  
> +static void
> +iavf_stat_update_48(uint64_t *offset,
> +		   uint64_t *stat)
> +{
> +	if (*stat >= *offset)
> +		*stat = *stat - *offset;
> +	else
> +		*stat = (uint64_t)((*stat +
> +			((uint64_t)1 << IAVF_48_BIT_WIDTH)) - *offset);
> +
> +	*stat &= IAVF_48_BIT_MASK;
> +}
> +
> +static void
> +iavf_stat_update_32(uint64_t *offset,
> +		   uint64_t *stat)
> +{
> +	if (*stat >= *offset)
> +		*stat = (uint64_t)(*stat - *offset);
> +	else
> +		*stat = (uint64_t)((*stat +
> +			((uint64_t)1 << IAVF_32_BIT_WIDTH)) - *offset);
> +}
> +
> +static void
> +iavf_update_stats(struct iavf_vsi *vsi,
> +					struct virtchnl_eth_stats *nes)

This syntax looks odd, will fix while merging, similar to above functions, no
need to break parameter lines into multiple line, will update them too.

  parent reply	other threads:[~2019-04-23 10:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22  2:18 Qiming Yang
2019-04-22  2:18 ` Qiming Yang
2019-04-23  3:26 ` Zhang, Qi Z
2019-04-23  3:26   ` Zhang, Qi Z
2019-04-23 10:56 ` Ferruh Yigit [this message]
2019-04-23 10:56   ` Ferruh Yigit
2019-05-08 16:20 ` Kevin Traynor
2019-05-08 16:20   ` Kevin Traynor

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=471602ea-d632-337a-9de5-c17d31419418@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.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).