[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309784740.26180.21.camel@mojatatu>
Date: Mon, 04 Jul 2011 09:05:40 -0400
From: jamal <hadi@...erus.ca>
To: Adam Katz <adamkatz0@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: libpcap and tc filters
On Mon, 2011-07-04 at 15:37 +0300, Adam Katz wrote:
> here's a more concrete example:
>
> An example configuration:
>
> sudo tc qdisc add dev eth1 root handle 1: prio priomap 2 2 2 2 2 2 2
> 2 2 2 2 2 2 2 2 2
> sudo tc qdisc add dev eth1 parent 1:1 handle 10: pfifo
> sudo tc qdisc add dev eth1 parent 1:2 handle 20: pfifo
> sudo tc qdisc add dev eth1 parent 1:3 handle 30: pfifo
> sudo tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> dport 22 0xffff flowid 1:1
> sudo tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> sport 22 0xffff flowid 1:1
> sudo tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip
> dport 80 0xffff flowid 1:2
> sudo tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip
> sport 80 0xffff flowid 1:2
looks fine.
> I then used scp to copy a small file between computers while capturing
> with wireshark:
>
> http://dl.dropbox.com/u/3237005/port22example.pcap
>
> and later I replayed the same capture using tcpreplay.
> When using scp, the packets once again ended up where they should be
> (1:1 in this configuration). With tcpreplay they ended up in the
> default 1:3
Where is the capture from tcpreplay? What i was asking is you validate
that the capture before and what is sent out by tcprelay look the same.
Can you please do that?
It is possible because your filters are not matched they end up on your
default queue based on tos value.
If you have your kernel compiled with CONFIG_CLS_U32_PERF you should
see when the filters get hit as well
(do something like sudo tc -s filter ls dev eth1)
cheers,
jamal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists