From: Ido Goshen <Ido@cgstowernetworks.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/pcap: imissed stats support
Date: Mon, 1 Feb 2021 14:02:02 +0000 [thread overview]
Message-ID: <DB7PR09MB23458A30004FE444CD16F6EFD6B69@DB7PR09MB2345.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <732a3fe2-1a64-1861-4360-2df996e2b5f3@intel.com>
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Monday, 1 February 2021 13:49
> To: Ido Goshen <Ido@cgstowernetworks.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2] net/pcap: imissed stats support
>
> 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?
>
ok
> <...>
>
> > @@ -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.
Not sure I get the request, isn't it what the patch already doing?
Value is already stored in 'eth_dev_stop' and added back when needed.
What do you mean by load it back on 'eth_dev_start' - where to load it to?
Please explain further
next prev parent reply other threads:[~2021-02-01 14:02 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
2021-02-01 14:02 ` Ido Goshen [this message]
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=DB7PR09MB23458A30004FE444CD16F6EFD6B69@DB7PR09MB2345.eurprd09.prod.outlook.com \
--to=ido@cgstowernetworks.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@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).