patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: longtb5@viettel.com.vn
Cc: stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] latency: clear mbuf timestamp after latency calculation
Date: Tue, 25 Sep 2018 13:37:43 +0100	[thread overview]
Message-ID: <1537879063.10481.48.camel@debian.org> (raw)
In-Reply-To: <1537345361-70088-2-git-send-email-longtb5@viettel.com.vn>

On Wed, 2018-09-19 at 15:15 +0700, longtb5@viettel.com.vn wrote:
> The timestamp of a mbuf should be cleared after that mbuf was used
> for
> latency calculation, otherwise future packets which reuse the same
> mbuf
> would inherit that previous timestamp. The latencystats library looks
> for mbuf with non-zero timestamp, thus incorrectly inherited value
> would
> result in incorrect latency measurement.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
> ---
>  lib/librte_latencystats/rte_latencystats.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_latencystats/rte_latencystats.c
> b/lib/librte_latencystats/rte_latencystats.c
> index 1fdec68..2d5384e 100644
> --- a/lib/librte_latencystats/rte_latencystats.c
> +++ b/lib/librte_latencystats/rte_latencystats.c
> @@ -156,8 +156,10 @@ calc_latency(uint16_t pid __rte_unused,
>  
>  	now = rte_rdtsc();
>  	for (i = 0; i < nb_pkts; i++) {
> -		if (pkts[i]->timestamp)
> +		if (pkts[i]->timestamp) {
>  			latency[cnt++] = now - pkts[i]->timestamp;
> +			pkts[i]->timestamp = 0;
> +		}
>  	}
>  
>  	for (i = 0; i < cnt; i++) {

Hi,

Is this patch only for stable releases? If so, which one? Or was dev@
absent by mistake?

Thanks

-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2018-09-25 12:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1537345361-70088-1-git-send-email-longtb5@viettel.com.vn>
2018-09-19  8:15 ` longtb5
2018-09-25 12:37   ` Luca Boccassi [this message]
2018-09-19  8:18 longtb5
     [not found] <1537345496-70207-1-git-send-email-longtb5@viettel.com.vn>
2018-09-19  8:22 ` longtb5
2018-09-20 10:25   ` Pattan, Reshma
2018-09-20 12:16     ` longtb5

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=1537879063.10481.48.camel@debian.org \
    --to=bluca@debian.org \
    --cc=longtb5@viettel.com.vn \
    --cc=stable@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).