From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ido Goshen <ido@cgstowernetworks.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/pcap: imissed stats support
Date: Mon, 1 Feb 2021 11:48:49 +0000 [thread overview]
Message-ID: <732a3fe2-1a64-1861-4360-2df996e2b5f3@intel.com> (raw)
In-Reply-To: <20210201083012.28544-1-ido@cgstowernetworks.com>
On 2/1/2021 8:30 AM, Ido Goshen wrote:
> Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
> ---
> v2:
> * sum all queues (rx_missed_total += fix)
> * null pcap protection
> * inter stop/start persistancy (counter won't reset on stop)
>
> drivers/net/pcap/rte_eth_pcap.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
> index a32b1f3f3..18c59d61c 100644
> --- a/drivers/net/pcap/rte_eth_pcap.c
> +++ b/drivers/net/pcap/rte_eth_pcap.c
> @@ -58,6 +58,8 @@ struct queue_stat {
> volatile unsigned long pkts;
> volatile unsigned long bytes;
> volatile unsigned long err_pkts;
> + volatile unsigned long missed_reset;
> + volatile unsigned long missed_mnemonic;
Can you please put some comments why 'missed_mnemonic' is required?
<...>
> @@ -695,6 +715,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
> stats->q_ibytes[i] = internal->rx_queue[i].rx_stat.bytes;
> rx_packets_total += stats->q_ipackets[i];
> rx_bytes_total += stats->q_ibytes[i];
> + unsigned long rx_missed = eth_pcap_stats_missed_get(dev, i) +
> + internal->rx_queue[i].rx_stat.missed_mnemonic -
> + internal->rx_queue[i].rx_stat.missed_reset;
Instead of including the 'missed_mnemonic' to the regular calculation, what do
you think to save the 'imissed' value to 'missed_mnemonic' in 'port_stop' and
load it back in the 'eth_dev_start'?
This balanced usage can simplify the code I think.
next prev parent reply other threads:[~2021-02-01 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 17:58 [dpdk-dev] [PATCH 1/1] " Ido Goshen
2021-01-28 18:10 ` Ferruh Yigit
2021-02-01 8:30 ` [dpdk-dev] [PATCH v2] " Ido Goshen
2021-02-01 11:48 ` Ferruh Yigit [this message]
2021-02-01 14:02 ` Ido Goshen
2021-02-01 16:21 ` Ferruh Yigit
2021-02-03 23:07 ` [dpdk-dev] [PATCH v3 1/1] " Ido Goshen
2021-02-04 0:13 ` Ferruh Yigit
2021-02-04 7:56 ` Ido Goshen
2021-02-04 9:26 ` Ferruh Yigit
2021-02-04 10:02 ` Ido Goshen
2021-02-04 10:27 ` Ferruh Yigit
2021-02-04 10:33 ` [dpdk-dev] [PATCH v4 " Ido Goshen
2021-02-04 18:31 ` Ferruh Yigit
2021-02-22 18:13 ` Ferruh Yigit
2021-01-28 18:20 ` [dpdk-dev] [PATCH " Ferruh Yigit
2021-02-01 8:53 ` Ido Goshen
2021-02-01 9:25 ` Ferruh Yigit
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=732a3fe2-1a64-1861-4360-2df996e2b5f3@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=ido@cgstowernetworks.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).