DPDK patches and discussions
 help / color / mirror / Atom feed
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 1/1] net/pcap: imissed stats support
Date: Mon, 1 Feb 2021 09:25:39 +0000	[thread overview]
Message-ID: <7f525cc7-260f-448a-4a05-763e0e84dd8f@intel.com> (raw)
In-Reply-To: <DB7PR09MB2345C571CD1C4D58476227E1D6B69@DB7PR09MB2345.eurprd09.prod.outlook.com>

On 2/1/2021 8:53 AM, Ido Goshen wrote:
> 
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Thursday, 28 January 2021 20:21
>> To: Ido Goshen <Ido@cgstowernetworks.com>
>> Cc: dev@dpdk.org
>> Subject: Re: [PATCH 1/1] net/pcap: imissed stats support
>>
>> On 1/25/2021 5:58 PM, Ido Goshen wrote:
>>> Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
>>
>> <...>
>>
>>> @@ -695,6 +708,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_stats_get_pcap_missed(dev, i);
>>> +		if (rx_missed)
>>> +			rx_missed_total = rx_missed -
>>> +				internal->rx_queue[i].rx_stat.missed_reset;
>>
>> 'ps_drop' seems u_32 type, do you know how it behaves on overflow? Do you
>> think do we need a check here for overflow?
> 
> Right, it may overflow after few hours.
> I don't see a way to fully solve it w/o periodic sampling which is quite an overhead

Agree

> To compensate and avoid getting weird high ("negative") values
> I can check if the last retrieved value is higher than the current, then either
> zero it (restart) which will reflect rollover, or
> add UINT_MAX hoping there was only one rollover since last sample
> Please advice
> 

I would go with single rollover assumption, but comment this in the code.

      reply	other threads:[~2021-02-01  9:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 17:58 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
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 [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=7f525cc7-260f-448a-4a05-763e0e84dd8f@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).