DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Qiu, Michael" <michael.qiu@intel.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "shemming@brocade.com" <shemming@brocade.com>
Subject: Re: [dpdk-dev] [PATCH 4/4] fm10k: remove crc size from all byte counters
Date: Tue, 17 Nov 2015 01:23:25 +0000	[thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E6028621B82684@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1447670117-17723-5-git-send-email-harry.van.haaren@intel.com>

Hi, Harry

Have you ever tested this patch by yourself?

fm10k's stats should already remove the crc bytes by default.

After your patch applied, if send a packet without vlan(64 bytes),
we expect receive 60 bytes, but it will disappoint you, that only
56 bytes shows in system.

Thanks,
Michael

On 2015/11/16 18:36, Harry van Haaren wrote:
> This patch removes the crc bytes from byte counter statistics.
>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> ---
>  drivers/net/fm10k/fm10k_ethdev.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
> index 441f713..fdb2e81 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -1183,11 +1183,13 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>  
>  	ipackets = opackets = ibytes = obytes = 0;
>  	for (i = 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) &&
> -		(i < hw->mac.max_queues); ++i) {
> +			(i < hw->mac.max_queues); ++i) {
>  		stats->q_ipackets[i] = hw_stats->q[i].rx_packets.count;
>  		stats->q_opackets[i] = hw_stats->q[i].tx_packets.count;
> -		stats->q_ibytes[i]   = hw_stats->q[i].rx_bytes.count;
> -		stats->q_obytes[i]   = hw_stats->q[i].tx_bytes.count;
> +		stats->q_ibytes[i]   = hw_stats->q[i].rx_bytes.count -
> +			(stats->q_ipackets[i] * 4);
> +		stats->q_obytes[i]   = hw_stats->q[i].tx_bytes.count -
> +			(stats->q_opackets[i] * 4);
>  		ipackets += stats->q_ipackets[i];
>  		opackets += stats->q_opackets[i];
>  		ibytes   += stats->q_ibytes[i];


  reply	other threads:[~2015-11-17  1:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 10:35 [dpdk-dev] [PATCH 0/4] Remove CRC from " Harry van Haaren
2015-11-16 10:35 ` [dpdk-dev] [PATCH 1/4] e1000: remove crc size from all " Harry van Haaren
2015-11-16 16:54   ` Stephen Hemminger
2015-11-16 17:03     ` Van Haaren, Harry
2015-11-16 10:35 ` [dpdk-dev] [PATCH 2/4] ixgbe: " Harry van Haaren
2015-11-16 10:35 ` [dpdk-dev] [PATCH 3/4] i40e: fix rx/tx size mismatch, remove crc bytes Harry van Haaren
2015-11-16 10:35 ` [dpdk-dev] [PATCH 4/4] fm10k: remove crc size from all byte counters Harry van Haaren
2015-11-17  1:23   ` Qiu, Michael [this message]
2015-11-18 10:48 ` [dpdk-dev] [PATCH v2 0/3] Remove CRC from " Harry van Haaren
2015-11-18 10:48   ` [dpdk-dev] [PATCH v2 1/3] e1000: remove crc size from all " Harry van Haaren
2015-11-18 10:48   ` [dpdk-dev] [PATCH v2 2/3] ixgbe: " Harry van Haaren
2015-11-18 10:48   ` [dpdk-dev] [PATCH v2 3/3] i40e: fix rx/tx size mismatch, remove crc bytes Harry van Haaren
2015-11-20 12:04   ` [dpdk-dev] [PATCH v2 0/3] Remove CRC from byte counters Ananyev, Konstantin
2015-11-23 21:51     ` Thomas Monjalon

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=533710CFB86FA344BFBF2D6802E6028621B82684@SHSMSX101.ccr.corp.intel.com \
    --to=michael.qiu@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=shemming@brocade.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).