All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paweł Staszewski" <pstaszewski@itcare.pl>
To: Jarek Poplawski <jarkao2@gmail.com>,
	Linux Network Development list <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] Re: iproute2 action/policer question
Date: Wed, 17 Jun 2009 11:33:35 +0200	[thread overview]
Message-ID: <4A38B86F.90307@itcare.pl> (raw)
In-Reply-To: <20090616183355.GA3800@ami.dom.local>

Jarek Poplawski pisze:
> Here is take 2 with Jamal's ack, and Pawel's name "simplified".
> Pawel, if you're not OK with this feel free to send your "Reported-by"
> line, and I hope David will replace it.
>
>   
:) it's OK
> Thanks,
> Jarek P.
> -------------------> take 2
> pkt_sched: Update drops stats in act_police
>
> Action police statistics could be misleading because drops are not
> shown when expected.
>
> With feedback from: Jamal Hadi Salim <hadi@cyberus.ca>
>
> Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
> ---
>
>  net/sched/act_police.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/sched/act_police.c b/net/sched/act_police.c
> index f8f047b..723964c 100644
> --- a/net/sched/act_police.c
> +++ b/net/sched/act_police.c
> @@ -294,6 +294,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
>  	if (police->tcfp_ewma_rate &&
>  	    police->tcf_rate_est.bps >= police->tcfp_ewma_rate) {
>  		police->tcf_qstats.overlimits++;
> +		if (police->tcf_action == TC_ACT_SHOT)
> +			police->tcf_qstats.drops++;
>  		spin_unlock(&police->tcf_lock);
>  		return police->tcf_action;
>  	}
> @@ -327,6 +329,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
>  	}
>  
>  	police->tcf_qstats.overlimits++;
> +	if (police->tcf_action == TC_ACT_SHOT)
> +		police->tcf_qstats.drops++;
>  	spin_unlock(&police->tcf_lock);
>  	return police->tcf_action;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>   


  reply	other threads:[~2009-06-17  9:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 20:10 iproute2 action/policer question Paweł Staszewski
2009-06-15 11:19 ` Jarek Poplawski
2009-06-15 13:32   ` jamal
2009-06-15 14:52     ` Jarek Poplawski
2009-06-15 16:09       ` Paweł Staszewski
2009-06-15 16:37         ` Jarek Poplawski
2009-06-15 16:44           ` Jarek Poplawski
2009-06-15 17:08             ` Paweł Staszewski
2009-06-15 20:07               ` Jarek Poplawski
2009-06-16 12:04       ` jamal
2009-06-17  6:14         ` Jarek Poplawski
2009-06-17  6:28           ` Jarek Poplawski
2009-06-17  6:45             ` Jarek Poplawski
2009-06-17  9:01             ` Denys Fedoryschenko
2009-06-17  9:26               ` Jarek Poplawski
2009-06-17 13:09                 ` jamal
2009-06-17 13:30                   ` Andreas Henriksson
2009-06-17 19:43                   ` Jarek Poplawski
2009-06-18 13:19                     ` jamal
2009-06-18 18:39                       ` Jarek Poplawski
2009-06-15 21:47     ` [PATCH] " Jarek Poplawski
2009-06-16 12:07       ` jamal
2009-06-16 18:33     ` [PATCH v2] " Jarek Poplawski
2009-06-17  9:33       ` Paweł Staszewski [this message]
2009-06-18  1:57       ` David Miller
2009-06-15 16:13   ` Paweł Staszewski

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=4A38B86F.90307@itcare.pl \
    --to=pstaszewski@itcare.pl \
    --cc=jarkao2@gmail.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.