From: Mihai RUSU <dizzy@roedu.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Hash without hashmask
Date: Wed, 06 Mar 2002 13:43:45 +0000 [thread overview]
Message-ID: <marc-lartc-101542192232664@msgid-missing> (raw)
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.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2002-03-06 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-06 13:43 Mihai RUSU [this message]
2002-03-07 12:05 ` [LARTC] Hash without hashmask bert hubert
2002-03-07 12:24 ` Mihai RUSU
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=marc-lartc-101542192232664@msgid-missing \
--to=dizzy@roedu.net \
--cc=lartc@vger.kernel.org \
/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.