From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
Qi Zhang <qi.z.zhang@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>
Cc: <jingjing.wu@intel.com>, <wenzhuo.lu@intel.com>, <dev@dpdk.org>,
<stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats
Date: Mon, 5 Aug 2019 13:52:06 +0300 [thread overview]
Message-ID: <120cd9d5-117a-0de7-b6b4-25736540cc96@solarflare.com> (raw)
In-Reply-To: <20190716215537.60762ee6@hermes.lan>
On 7/17/19 7:55 AM, Stephen Hemminger wrote:
> On Wed, 17 Jul 2019 12:31:00 +0800
> Qi Zhang <qi.z.zhang@intel.com> wrote:
>
>> Exclude 4 bytes CRC for rx bytes stats.
>> This also aligned Rx stats calculation with PF.
>>
>> Fixes: f4a41a6953af ("net/avf: support stats")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>> ---
>> drivers/net/iavf/iavf_ethdev.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
>> index 53dc05c78..fe75e86ab 100644
>> --- a/drivers/net/iavf/iavf_ethdev.c
>> +++ b/drivers/net/iavf/iavf_ethdev.c
>> @@ -1047,6 +1047,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>> stats->imissed = pstats->rx_discards;
>> stats->oerrors = pstats->tx_errors + pstats->tx_discards;
>> stats->ibytes = pstats->rx_bytes;
>> + stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
>> stats->obytes = pstats->tx_bytes;
>> } else {
>> PMD_DRV_LOG(ERR, "Get statistics failed");
> Correct, DPDK statistics should not include CRC.
Stephen, Thomas, Ferruh,
is it documented somewhere? May be we should update fields
description and rte_eth_stats_get() which mentions these fields
as well to highlight it?
Thanks,
Andrew.
prev parent reply other threads:[~2019-08-05 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 4:31 Qi Zhang
2019-07-17 4:55 ` Stephen Hemminger
2019-07-19 0:17 ` Zhang, Qi Z
2019-08-05 10:52 ` Andrew Rybchenko [this message]
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=120cd9d5-117a-0de7-b6b4-25736540cc96@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@intel.com \
/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).