Re: Ingress filter is overly aggressive

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/2/19 Neil Aggarwal <neil@xxxxxxxxxxxxxxxxxx>:
> Hello:
>
> I have these rules set up for an interface:
>
> IP=a.b.c.d
> DEV=v1208
> /sbin/tc qdisc del dev $DEV root
> /sbin/tc qdisc add dev $DEV root handle 1: htb default 30
> /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 5mbit
> /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 5mbit
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip
> dst
> $IP flowid 1:1
> /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip
> src
> $IP flowid 1:2
> /sbin/tc qdisc del dev $DEV ingress
> /sbin/tc qdisc add dev $DEV ingress handle ffff:
> /sbin/tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip
> src 0.0.0.0/0 police rate 5mbit burst 500k drop flowid :1
>
> According to these rules, the ingress police rate should be 5 mbit/sec,
> but
> I am barely
> getting 50 kbits/sec through the interface.
>
> If I remove the filter, the interface operates at full line rate.
>
> Any ideas why the ingress filter is being so aggressive?
>
> Thanks,
>   Neil

You need to set the parameter CEIL in definition of HTB,

i.e. /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate
0,5mbit ceil 5mbit

The ceil argument specifies the maximum bandwidth that a class can use.
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux