Re: cls_flow "handle" argument?

Linux Advanced Routing and Traffic Control

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

 



Jack Bates wrote:
Do you know the meaning of the "handle" argument to the cls_flow
classifier/filter? If I don't specify a "handle" argument, I get the
following error, but I haven't yet found an explanation of what the
argument does, or what value it should take:

It doesn't seem to affect anything in my tests whatever value it has.

The code shows it gets used if the major id is 0 and for change - I couldn't come up with a working test that used this.

I want to share 1.5mbit fairly among hosts (per-host fair queuing), my
work in progress script is as follows:

I don't think using just one queue for upload and download will be very nice - I would use htb and try and separate up and down, you can make them share/borrow so that you don't go over the 1.5mbit.

You may need to set the bandwidth to < 1.5mbit to get proper control.


    1: ifconfig ifb0 up
    2:
    3: insmod sch_prio
    4: tc qdisc add dev eth0.2 root handle 1 prio
    5:
    6: insmod sch_ingress
    7: tc qdisc add dev eth0.2 ingress
    8:
    9: insmod cls_u32
   10: insmod act_mirred
   11: tc filter add dev eth0.2 parent 1: protocol ip prio 1 u32 match
u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0
   12: tc filter add dev eth0.2 parent ffff: protocol ip prio 1 u32
match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0
   13:
   14: insmod cls_flow
   15: tc filter add dev eth0.2 parent 1: protocol ip prio 1 flow hash
keys nfct-src
   16: tc filter add dev eth0.2 parent ffff: protocol ip prio 1 flow
hash keys nfct-dst

I don't think putting flow on the real if will work with mirred - it would need to be on ifb and attached to the sfq(s).

I don't think (but am not sure) that nfct-dst will work on ingress as the packet hasn't hit netfilter yet. If your openwrt is just routing and doesn't have significant traffic to/from it apart from internet then you could redirect from egress on the lan facing if(s) rather than ingress.

--
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