[LARTC] Two u32 problems: module count and fw

Linux Advanced Routing and Traffic Control

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

 



Hi All,
	I found 2 unusual behavior with u32 classifier in Kernel 2.4.12. I?ve u32
compiled as module.
1> u32 filter seems not working if there is already some fw filter used for
some other class. In order to get u32 working I?ve to delete root class,
which in terms delete all fw filters too, and then same command for u32
works. fw is also compiled as module.

2> If I add u32 filter to my classid then it increase module-count, which I
can see in "lsmod". I know this is normal behavior. But if I attach more u32
filter in same classid it doesn?t increase module-count more. Is this normal
behaviour?
	Also I observed that if I create one more class and if I attach one u32
filter then also module use count remains same.
	Does it mean that u32 used count increase once per device? Because if I
implement shaper class on other device then it increase used count by one.
	Following is implementation specific command line:
# /sbin/tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt
1000 cell 8
# /sbin/tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit
\
rate 100Mbit allot 1514 cell 8 weight 10Mbit prio 8 maxburst 20 avpkt 1000
# /sbin/tc class add dev eth0 parent 10:1 classid 10:010 cbq bandwidth
100Mbit  \
rate 96Kbit allot 1514 cell 8 weight 10Kbit prio 5 maxburst 20 avpkt 1000
bounded
# /sbin/tc qdisc add dev eth0 parent 10:010 red max 12288 min 1500 limit
12288  avpkt 1000 burst 20
# /sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
tos 0x10 0xff flowid 10:010
# /sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
dst 192.9.203.57 flowid 10:010

	Though u32 is used twich here I can get only one refrence count in ?lsmod?
# lsmod
Module                  Size  Used by
cls_u32                 4944   1  (autoclean)
sch_red                 2464   1  (autoclean)

	Now if I create one more class on same device(eth0) and use u32 filter to
classifiy my traffic then also this count remains same(Isn?t surprising?)

# /sbin/tc class add dev eth0 parent 10:0 classid 10:2 cbq bandwidth 100Mbit
\
rate 100Mbit allot 1514 cell 8 weight 10Mbit prio 8 maxburst 20 avpkt 1000
# /sbin/tc class add dev eth0 parent 10:2 classid 10:020 cbq bandwidth
100Mbit  \
rate 96Kbit allot 1514 cell 8 weight 10Kbit prio 5 maxburst 20 avpkt 1000
bounded
# /sbin/tc qdisc add dev eth0 parent 10:020 red max 12288 min 1500 limit
12288  \
avpkt 1000 burst 20
# /sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
\
tos 0x10 0xff flowid 10:020

# lsmod
Module                  Size  Used by
cls_u32                 4944   1  (autoclean)
sch_red                 2464   2  (autoclean)

	If I do same process on second device (eth1) then first time it increase
module count by one so now total used count shown is 2. Subsequent u32 usage
does not increase this use count.

	Thanks for any URL on patch of this problem or description of this
behavior.

-- Sumit




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