* tc filter u32 match
@ 2012-05-22 13:42 Nieścierowicz Adam
2012-05-24 10:04 ` Jamal Hadi Salim
0 siblings, 1 reply; 4+ messages in thread
From: Nieścierowicz Adam @ 2012-05-22 13:42 UTC (permalink / raw)
To: netdev
Hello,
I'm in the process of building a new shaper, when adding support for
802.1q
vlan noticed that u32 can catch network traffic without giving 4 bytes
offset. How is this possible?
My environment:
eth2 - network card
eth2.200 - vlan
/sbin/tc filter add dev eth2 parent 1:0 prio 5 handle 35: protocol ip
u32 divisor 256
/sbin/tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 ht 800::
match ip dst 31.41.208.32/27 hashkey mask 0x000000ff at 16 link 35:
/sbin/tc filter add dev eth2 protocol ip parent 1: prio 1 u32 ht 35:24:
match ip dst 31.41.208.36 flowid 1:2e5
Here you can see the hits in the rule
filter parent 1: protocol ip pref 5 u32 fh 35:24:800 order 2048 key ht
35 bkt 24 flowid 1:2e5 (rule hit 44037 success 44037)
match 1f29d024/ffffffff at 16 (success 44037 )
I found a similar question here
http://serverfault.com/questions/370795/tc-u32-how-to-match-l2-protocols-in-recent-kernels
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tc filter u32 match
2012-05-22 13:42 tc filter u32 match Nieścierowicz Adam
@ 2012-05-24 10:04 ` Jamal Hadi Salim
2012-11-07 23:36 ` Nieścierowicz Adam
0 siblings, 1 reply; 4+ messages in thread
From: Jamal Hadi Salim @ 2012-05-24 10:04 UTC (permalink / raw)
To: adam.niescierowicz; +Cc: netdev
On Tue, 2012-05-22 at 15:42 +0200, Nieścierowicz Adam wrote:
> Hello,
>
> I'm in the process of building a new shaper, when adding support for
> 802.1q
> vlan noticed that u32 can catch network traffic without giving 4 bytes
> offset. How is this possible?
>
Because we look at where the network header starts?
Why do you expect 4 bytes to be counted?
> My environment:
>
> eth2 - network card
> eth2.200 - vlan
>
> /sbin/tc filter add dev eth2 parent 1:0 prio 5 handle 35: protocol ip
> u32 divisor 256
> /sbin/tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 ht 800::
> match ip dst 31.41.208.32/27 hashkey mask 0x000000ff at 16 link 35:
> /sbin/tc filter add dev eth2 protocol ip parent 1: prio 1 u32 ht 35:24:
> match ip dst 31.41.208.36 flowid 1:2e5
>
> Here you can see the hits in the rule
> filter parent 1: protocol ip pref 5 u32 fh 35:24:800 order 2048 key ht
> 35 bkt 24 flowid 1:2e5 (rule hit 44037 success 44037)
> match 1f29d024/ffffffff at 16 (success 44037 )
I dont see an issue. This looks correct.
>
> I found a similar question here
> http://serverfault.com/questions/370795/tc-u32-how-to-match-l2-protocols-in-recent-kernels
>
There may have been bugs in the past that someone missed or didnt
report here (likely around the time there was a lot of changes
happening with vlan offloading). Try the latest kernel and
if it behaves badly, send a report and a reproducible test case.
cheers,
jamal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tc filter u32 match
2012-05-24 10:04 ` Jamal Hadi Salim
@ 2012-11-07 23:36 ` Nieścierowicz Adam
0 siblings, 0 replies; 4+ messages in thread
From: Nieścierowicz Adam @ 2012-11-07 23:36 UTC (permalink / raw)
To: Jamal Hadi Salim, Netdev
W dniu 24.05.2012 12:04, Jamal Hadi Salim napisał(a):
> On Tue, 2012-05-22 at 15:42 +0200, Nieścierowicz Adam wrote:
>
>> Hello, I'm in the process of building a new shaper, when adding
>> support
>> for 802.1q vlan noticed that u32 can catch network traffic without
>> giving 4 bytes offset. How is this possible?
>
> Because we look at where the network header starts?
> Why do you expect 4 bytes to be counted?
>
>> My environment: eth2 - network card eth2.200 - vlan /sbin/tc filter
>> add
>> dev eth2 parent 1:0 prio 5 handle 35: protocol ip u32 divisor 256
>> /sbin/tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 ht
>> 800::
>> match ip dst 31.41.208.32/27 hashkey mask 0x000000ff at 16 link 35:
>> /sbin/tc filter add dev eth2 protocol ip parent 1: prio 1 u32 ht
>> 35:24:
>> match ip dst 31.41.208.36 flowid 1:2e5 Here you can see the hits in
>> the
>> rule filter parent 1: protocol ip pref 5 u32 fh 35:24:800 order 2048
>> key ht 35 bkt 24 flowid 1:2e5 (rule hit 44037 success 44037) match
>> 1f29d024/ffffffff at 16 (success 44037 )
>
> I dont see an issue. This looks correct.
>
>>> I found a similar question here
>>
>
http://serverfault.com/questions/370795/tc-u32-how-to-match-l2-protocols-in-recent-kernels
>>
>
> There may have been bugs in the past that someone missed or didnt
> report here (likely around the time there was a lot of changes
> happening with vlan offloading). Try the latest kernel and
> if it behaves badly, send a report and a reproducible test case.
Hello Again,
I changed the kernel to 3.6.0 and ip traffic classification on the
interface and vlan works fine.
Unfortunately I am not able to classify
PPPoE traffic, I checked filters with offset: 16, 20, 24, 28
Is it possible to classify PPPoE traffic on the main interface as it
was in previous kernels?
^ permalink raw reply [flat|nested] 4+ messages in thread
* tc filter u32 match
@ 2012-05-22 13:45 Nieścierowicz Adam
0 siblings, 0 replies; 4+ messages in thread
From: Nieścierowicz Adam @ 2012-05-22 13:45 UTC (permalink / raw)
To: netdev
Hello,
I'm in the process of building a new shaper, when adding support for
802.1q
vlan noticed that u32 can catch network traffic without giving 4 bytes
offset. How is this possible?
My environment:
eth2 - network card
eth2.200 - vlan
/sbin/tc filter add dev eth2 parent 1:0 prio 5 handle 35: protocol ip
u32 divisor 256
/sbin/tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 ht 800::
match ip dst 31.41.208.32/27 hashkey mask 0x000000ff at 16 link 35:
/sbin/tc filter add dev eth2 protocol ip parent 1: prio 1 u32 ht 35:24:
match ip dst 31.41.208.36 flowid 1:2e5
Here you can see the hits in the rule
filter parent 1: protocol ip pref 5 u32 fh 35:24:800 order 2048 key ht
35 bkt 24 flowid 1:2e5 (rule hit 44037 success 44037)
match 1f29d024/ffffffff at 16 (success 44037 )
I found a similar question here
http://serverfault.com/questions/370795/tc-u32-how-to-match-l2-protocols-in-recent-kernels
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-07 23:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 13:42 tc filter u32 match Nieścierowicz Adam
2012-05-24 10:04 ` Jamal Hadi Salim
2012-11-07 23:36 ` Nieścierowicz Adam
2012-05-22 13:45 Nieścierowicz Adam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).