From: Jarek Poplawski <jarkao2@gmail.com>
To: jamal <hadi@cyberus.ca>
Cc: "Paweł Staszewski" <pstaszewski@itcare.pl>,
"Linux Network Development list" <netdev@vger.kernel.org>,
"David Miller" <davem@davemloft.net>
Subject: [PATCH] Re: iproute2 action/policer question
Date: Mon, 15 Jun 2009 23:47:48 +0200 [thread overview]
Message-ID: <20090615214748.GA3857@ami.dom.local> (raw)
In-Reply-To: <1245072728.3948.14.camel@dogo.mojatatu.com>
On Mon, Jun 15, 2009 at 09:32:08AM -0400, jamal wrote:
> On Mon, 2009-06-15 at 11:19 +0000, Jarek Poplawski wrote:
>
> > > This is only a sample but is not working
>
> It does seem to be working!
> How did you reach conclusion it wasnt working?
>
> > > Action statistics:
> > > Sent 42351 bytes 110 pkt (dropped 0, overlimits 32 requeues 0)
> > > rate 0bit 0pps backlog 0b 0p requeues 0
Jamal, after looking into act_gact or act_nat I guess we should update
drops here likewise, unless I miss something?
Pawel, if it works for you could you send your "Tested-by"?
Thanks,
Jarek P.
------------------->
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: =?ISO-8859-2?Q?Pawe=B3_Staszewski?= <pstaszewski@itcare.pl>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
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;
}
next prev parent reply other threads:[~2009-06-15 21:48 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 ` Jarek Poplawski [this message]
2009-06-16 12:07 ` [PATCH] " jamal
2009-06-16 18:33 ` [PATCH v2] " Jarek Poplawski
2009-06-17 9:33 ` Paweł Staszewski
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=20090615214748.GA3857@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
--cc=pstaszewski@itcare.pl \
/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.