Doubt on dsmark flow

Linux Advanced Routing and Traffic Control

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

 



Dear stef,

          Thanks for your previous reply.I gone through the link that u mentioned in reply.I need some help from you.I am curious to know the exact flow of the packet i.e. where exactly "ds" will be set,where queuing will happen etc ? Let me describe my thing.I added some printk statements in some files of netfilter code and sch_dsmark.c file.I gave the following sequence of commands in my machine.

$  ./tc qdisc add dev eth0 handle 1:0 root dsmark indices 4
$  ./tc class change dev eth0 classid 1:1 dsmark mask 0x0 value 0x80
$  ./tc class change dev eth0 classid 1:2 dsmark mask 0x0 value 0x40
$  ./tc class change dev eth0 classid 1:3 dsmark mask 0x0 value 0x20

$  ./tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip src 172.30.180.43 flowid 1:1
$  ./tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 172.30.180.100 flowid 1:2

After that i gave ping to machine 172.30.180.44 .
On 172.30.180.44 i am capturing packets using tcpdump.In IP header,ds is set to 0x80 which is fine.

From the printk statements on the console i understand the following things:

-> First packet is going to iptables
-> After that packet is coming to dsmark_enqueue
-> Packet is coming to dsmark_dequeue
-> Packet is coming to iptables again.

I have seen the code of dsmark_enqueue and dsmark_dequeue functions.In dsmark_enqueue ds value is reading and in dsmark_dequeue ds value is setting with what we gave in command line.Let me clarify if anything wrong in this flow?Also tell me why packet is again going to iptables after queueing? If u know exact flow pls explain in brief.Anyhelp is appreciated.

Thanks in advance,
Aravind.








Yahoo! India Promotions Yahoo! India Promos: Win a trip for 2 to Britain. Click here.


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