[LARTC] Hash without hashmask

Linux Advanced Routing and Traffic Control

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

 



Hi

I one wants to optimize some ipchains/iptables filtering rules usually
does "hashes" by creating users chains and transforming the search from a
linear one to a btree like one.

For CBQ filters one possibility is using hashmask along with u32 devisor
and ht parameter for filters.

Is the "link" parameter (used to specify the "major" number of a hash)
only for devisor created hashes ?

Im trying to emultate the "user chains" from firewall into CBQ filters
(the fwmark wouldnt do couse even the search in firewall would be a btree,
the search for a fwmark would be linear and wouldnt scale well for many
classes).

Im using this test commands:
/sbin/tc qdisc del dev eth0 root
/sbin/tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit allot
1514 avpkt 1000 cell 8
/sbin/tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 100Mbit
rate 100Mbit avpkt 1000 prio 8 allot 1514 weight 1 maxburst 21
/sbin/tc class add dev eth0 parent 1:1 classid 1:10 estimator 1sec 8sec
cbq bandwidth 100Mbit rate 16kbit avpkt 1000 prio 5 allot 1514 weight 1
maxburst 21 bounded
/sbin/tc class add dev eth0 parent 1:1 classid 1:20 estimator 1sec 8sec
cbq bandwidth 100Mbit rate 128kbit avpkt 1000 prio 5 allot 1514 weight 1
maxburst 21 bounded

/sbin/tc qdisc add dev eth0 parent 1:10 pfifo limit 131
/sbin/tc qdisc add dev eth0 parent 1:20 pfifo limit 131

The above lines just create 2 cbq classes on eth0 and atach a pfifo qdisc
on the leaf classes.

/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 match ip
dst 213.157.165.0/24 link 2:
RTNETLINK answers: Invalid argument

This is because "link" can ONLY be used with "devisor" created tables ?

Thanks

----------------------------
Mihai RUSU

Disclaimer: Any views or opinions presented within this e-mail are solely
those of the author and do not necessarily represent those of any company,
unless otherwise specifically stated.



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