Hi, I've just repeated your commands (with eth0) on the current Linus' tree and it works OK. Check your .config and "modules_install" again, and if no result send gzipped .config and show "lsmod" and "tc -V" output after these commands above. Cheers, Jarek P. --
Hello again Sorry for taking so long, been busy with some unexpected work. I have checked the .config and can not (to the extent of my not-guru knowledge) find anything out of place. Excuse me if its obvious and it didnt strike me yet. The commands asked plus some others i remembered give the output at the bottom. Where can i send the gzipped .config? Not the list, I imagine? I have confirmed again that the exact same commands (as on the original message), work flawlessly on 2.6.28.7 without a hitch, and, AFAIK, work as intended. I have also tried the latest 2.6.29-rc6-git7 and it still fails like on git6. It happens even with other NIC's (both a D-Link gigabit and an onboard Atheros A1L gigabit (output of lspci -vv at the end of this message). Thank you very much for your time, Joao Correia Output of the commands: (big wall of text coming your way, beware) [root@duron ~]# lsmod Module Size Used by act_police 5028 0 sch_ingress 2236 2 cls_fw 4636 1 cls_u32 7196 6 sch_sfq 5884 3 sch_cbq 16764 1 xt_ipp2p 8220 1 xt_MARK 2012 1 xt_CONNMARK 2780 2 xt_dscp 2268 3 xt_CLASSIFY 1468 7 ipt_MASQUERADE 2652 1 xt_connlimit 3876 6 xt_mac 1500 18 xt_mark 1628 18 xt_comment 1436 40 xt_time 2652 42 xt_DELUDE 2524 1 xt_TARPIT 2876 2 xt_CHAOS 3412 1 compat_xtables 3196 3 xt_DELUDE,xt_TARPIT,xt_CHAOS xt_limit 2016 5 iptable_raw 1980 0 iptable_mangle 2556 1 iptable_nat 4988 1 nf_nat 16400 2 ipt_MASQUERADE,iptable_nat ipt_ULOG 6948 3 autofs4 24448 2 it87 20012 0 hwmon_vid 2940 1 it87 ipv6 ...
... Joao, you don't need to be sorry at all - on the contrary I'm extremely sorry! I was so focused on the kernel version but ignored updating iproute, and it looks like this matters here. So you're right. Alas I'll not be able to look at it until "tomorrow" in the evening. Thanks for the report, Jarek P. --
I have also reproduced this on Linus' latest 2.6.29-rc6 tree, using tc
version iproute2-ss071016 and a kernel config with all traffic control
features enabled.
The error reported by tc comes from the kernel-level check added by:
commit c1b56878fb68e9c14070939ea4537ad4db79ffae
Author: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue Nov 25 21:14:06 2008 -0800
tc: policing requires a rate estimator
Found that while trying average rate policing, it was possible to
request average rate policing without a rate estimator. This results
in no policing which is harmless but incorrect.
Since policing could be setup in two steps, need to check
in the kernel.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
I got the same error when using the tc version iproute2-ss090115 built
this evening from the public git repository.
-- John
--
Hello Just to confirm that i also have all traffic control/shaping (QoS, connection limits, scheduling, etc) enabled on the config i use. Its not just the specific version of tc i posted, i tried one from last year (october, but i didnt note the exact build) with the same result. Cheers, Joao Correia Centro de Informatica Universidade da Beira Interior Portugal --
Maybe good idea to use strace? (i dont know which flags useful, but usually i use "-s 65536") Just maybe it will give a bit more ideas what is happening. But sure netdev developers can tell, if it is useful or not. --
Very nice diagnose, thanks!
Jarek P.
PS: after upgrading iproute I couldn't reproduce this seemingly OK
test with older versions anymore...
------------------->
pkt_sched: act_police: Fix a rate estimator test.
A commit c1b56878fb68e9c14070939ea4537ad4db79ffae "tc: policing requires
a rate estimator" introduced a test which invalidates previously working
configs, based on examples from iproute2: doc/actions/actions-general.
This is too rigorous: a rate estimator is needed only when police's
"avrate" option is used.
Reported-by: Joao Correia <joaomiguelcorreia@gmail.com>
Diagnosed-by: John Dykstra <john.dykstra1@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/act_police.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 5c72a11..f8f047b 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -183,13 +183,6 @@ override:
if (R_tab == NULL)
goto failure;
- if (!est && (ret == ACT_P_CREATED ||
- !gen_estimator_active(&police->tcf_bstats,
- &police->tcf_rate_est))) {
- err = -EINVAL;
- goto failure;
- }
-
if (parm->peakrate.rate) {
P_tab = qdisc_get_rtab(&parm->peakrate,
tb[TCA_POLICE_PEAKRATE]);
@@ -205,6 +198,12 @@ override:
&police->tcf_lock, est);
if (err)
goto failure_unlock;
+ } else if (tb[TCA_POLICE_AVRATE] &&
+ (ret == ACT_P_CREATED ||
+ !gen_estimator_active(&police->tcf_bstats,
+ &police->tcf_rate_est))) {
+ err = -EINVAL;
+ goto failure_unlock;
}
/* No failure allowed after this point */
--
Hello Confirmed working now on latest 2.6.29-rc6 git. Thank you very much all for the prompt answer and solution, really impressive. Back to work on the ultimate custom firewall *evil laugh*. Cheers, Joao Correia Centro de Informatica Universidade da Beira Interior Portugal --
From: Joao Correia <joaomiguelcorreia@gmail.com> Applied, thanks everyone. --
