From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ido Goshen <Ido@cgstowernetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/pcap: imissed stats support
Date: Mon, 1 Feb 2021 16:21:03 +0000 [thread overview]
Message-ID: <78f296a2-aa02-f1f3-8fad-a9bbd126dca0@intel.com> (raw)
In-Reply-To: <DB7PR09MB23458A30004FE444CD16F6EFD6B69@DB7PR09MB2345.eurprd09.prod.outlook.com>
On 2/1/2021 2:02 PM, Ido Goshen wrote:
>
>
>> -----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
>
Please ignore above comment, it was wrong, the intention was to not complicate
the stats function with 'missed_mnemonic' & 'missed_reset' details,
for that what do you think to move the 'missed_mnemonic' & 'missed_reset' usage
into the 'eth_pcap_stats_missed_get()'?
This also fixes imissed stats after multiple 'port_stop'.
Also a 'eth_pcap_stats_missed_reset()' can be added for same reason.
next prev parent reply other threads:[~2021-02-01 16:21 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
2021-02-01 16:21 ` Ferruh Yigit [this message]
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=78f296a2-aa02-f1f3-8fad-a9bbd126dca0@intel.com \
--to=ferruh.yigit@intel.com \
--cc=Ido@cgstowernetworks.com \
--cc=dev@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).