will any one do me a favor to answer the question about tc_index value

Linux Advanced Routing and Traffic Control

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

 



 hi all
 
i am a new commer of linux community. 
i want to how does skb->tcindex value change
exactly. it confused me indeed. 

 i have a script reads:
 (1) tc qdisc add dev eth0 root handle 1:0 dsmark indices 64 default_index 0x161 set_tc_index
 (2) tc filter add dev eth0 parent 1:0 protocol all prio 1 tcindex mask 0xfc shift 2 pass_on
 (3) tc filter add dev eth0 parent 1:0 prio 1 handle 0x0a tcindex classid 1:111
 (4) tc filter add dev eth0 parent 2:0 protocol all prio 1 tcindex mask 0xf0 shift 4 pass_on
 (5) tc filter add dev eth0 parent 2:0 prio 1 handle 1 tcindex classid 2:2
 
 now if a packet with a Diffserv field 0x28 , its skb->tcindex value 
 will be change into 0xa by masking 0xfc and shift 2. Is that so?
 
 then it'll be match by the filter defined in line (3) and got a 
 classid 1:111, now what is its skb->tcindex value then in binary ?
 is it 0001,0001,0001 or in hex 0x111 ? 
 
 i think that skb->tcindex value is only 8bits. is that so?
 
 if after line (3), its skb->tcindex value is 0x111, then 
 after line (4), its skb->tcindex value  should be 0x1 , right?
 
 now, in line (5), because its skb->tcindex value is 0x1, 
 it is directed into class 2:2, right?
 ok ,what is its skb->tcindex value  now ? 0x2 or 0x111 ? 
 
 thanks for answer these quesions :)
 
 Folke 
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿË™¨¥Šx%ŠË,SùšŠYšŸ÷lõ¯ç–m§ÿÿ™¨¥™©ÿvÏZþy™¨¥™©ÿ–+-ŠwèþV«µÁÎY3ÿ†Ûiÿÿåj»\þŠà


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