* Possible bug in tc tool or kernel
@ 2015-03-17 9:57 Соловьев Сергей
2015-03-17 20:42 ` Cong Wang
0 siblings, 1 reply; 5+ messages in thread
From: Соловьев Сергей @ 2015-03-17 9:57 UTC (permalink / raw)
To: netdev
Hi!
I'm sol sorry, but English in not my native language.
After upgrade kernel tc lost some u32 filters
example: where is a "match ip dst 10.10.0.0/24" entries?
[root@sol ~]# tc -b tc.batch
[root@sol ~]# tc filter list dev p10p1
filter parent 1: protocol ip pref 10 u32
filter parent 1: protocol ip pref 10 u32 fh 209: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 208: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 207: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 206: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 205: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 204: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 203: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 202: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 201: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 200: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100::800 order 2048 key ht
100 bkt 0 link 200:
match 0a0a0000/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht
800 bkt 0 link 100:
match 0a0a0000/ffff0000 at 16
hash mask 0000ff00 at 16
[root@sol ~]#
[root@sol ~]#
[root@sol ~]# cat tc.batch
qdisc add dev p10p1 root handle 1: htb default fffe
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 100: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 800:: match
ip dst 10.10.0.0/16 hashkey mask 0x0000ff00 at 16 link 100:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 200: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:0: match
ip dst 10.10.0.0/24 hashkey mask 0x000000ff at 16 link 200:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 201: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:1: match
ip dst 10.10.1.0/24 hashkey mask 0x000000ff at 16 link 201:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 202: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:2: match
ip dst 10.10.2.0/24 hashkey mask 0x000000ff at 16 link 202:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 203: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:3: match
ip dst 10.10.3.0/24 hashkey mask 0x000000ff at 16 link 203:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 204: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:4: match
ip dst 10.10.4.0/24 hashkey mask 0x000000ff at 16 link 204:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 205: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:5: match
ip dst 10.10.5.0/24 hashkey mask 0x000000ff at 16 link 205:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 206: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:6: match
ip dst 10.10.6.0/24 hashkey mask 0x000000ff at 16 link 206:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 207: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:7: match
ip dst 10.10.7.0/24 hashkey mask 0x000000ff at 16 link 207:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 208: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:8: match
ip dst 10.10.8.0/24 hashkey mask 0x000000ff at 16 link 208:
filter add dev p10p1 parent 1:0 protocol ip pref 10 handle 209: u32
divisor 256
filter add dev p10p1 parent 1:0 protocol ip pref 10 u32 ht 100:9: match
ip dst 10.10.9.0/24 hashkey mask 0x000000ff at 16 link 209:
[root@sol ~]# uname -a
Linux sol.sol-home.local 3.18.9-200.fc21.x86_64 #1 SMP Mon Mar 9
15:10:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@sol ~]#
ruleset in tc.batch autogenerating by this tool
http://sourceforge.net/projects/sc-tool/
If i copy-paste pules directly to tc command line, tc accept this line
without any error. But rule in tc filter show is absent.
[root@sol ~]# tc filter add dev p10p1 parent 1:0 protocol ip pref 10 u32
ht 100:9: match ip dst 10.10.9.0/24 hashkey mask 0x000000ff at 16 link 209:
[root@sol ~]# echo $?
0
[root@sol ~]# tc filter list dev p10p1
filter parent 1: protocol ip pref 10 u32
filter parent 1: protocol ip pref 10 u32 fh 209: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 208: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 207: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 206: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 205: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 204: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 203: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 202: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 201: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 200: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100::800 order 2048 key ht
100 bkt 0 link 200:
match 0a0a0000/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht
800 bkt 0 link 100:
match 0a0a0000/ffff0000 at 16
hash mask 0000ff00 at 16
[root@sol ~]#
dmesg is clear.
Hoop to helping, Soloview Sergey.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Possible bug in tc tool or kernel
2015-03-17 9:57 Possible bug in tc tool or kernel Соловьев Сергей
@ 2015-03-17 20:42 ` Cong Wang
2015-03-17 21:21 ` Vadim Kochan
2015-03-19 14:45 ` Соловьев Сергей
0 siblings, 2 replies; 5+ messages in thread
From: Cong Wang @ 2015-03-17 20:42 UTC (permalink / raw)
To: Соловьев Сергей
Cc: netdev
On Tue, Mar 17, 2015 at 2:57 AM, Соловьев Сергей <sol@eqv.ru> wrote:
> Hi!
>
> I'm sol sorry, but English in not my native language.
>
> After upgrade kernel tc lost some u32 filters
>
> example: where is a "match ip dst 10.10.0.0/24" entries?
>
Can you check if the following commit fixes your problem?
It is already merged in stable kernel, you probably need to
wait for a newer Fedora kernel release if it has included it.
commit b057df24a7536cce6c372efe9d0e3d1558afedf4
Author: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Date: Tue Feb 3 19:05:18 2015 +0100
cls_api.c: Fix dumping of non-existing actions' stats.
In tcf_exts_dump_stats(), ensure that exts->actions is not empty before
accessing the first element of that list and calling tcf_action_copy_stats()
on it. This fixes some random segvs when adding filters of type
"basic" with
no particular action.
This also fixes the dumping of those "no-action" filters, which more often
than not made calls to tcf_action_copy_stats() fail and consequently netlink
attributes added by the caller to be removed by a call to nla_nest_cancel().
Fixes: 33be62715991 ("net_sched: act: use standard struct list_head")
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Possible bug in tc tool or kernel
2015-03-17 20:42 ` Cong Wang
@ 2015-03-17 21:21 ` Vadim Kochan
2015-03-19 14:45 ` Соловьев Сергей
1 sibling, 0 replies; 5+ messages in thread
From: Vadim Kochan @ 2015-03-17 21:21 UTC (permalink / raw)
To: Cong Wang
Cc: Соловьев Сергей,
netdev
On Tue, Mar 17, 2015 at 01:42:54PM -0700, Cong Wang wrote:
> On Tue, Mar 17, 2015 at 2:57 AM, Соловьев Сергей <sol@eqv.ru> wrote:
> > Hi!
> >
> > I'm sol sorry, but English in not my native language.
> >
> > After upgrade kernel tc lost some u32 filters
> >
> > example: where is a "match ip dst 10.10.0.0/24" entries?
> >
>
> Can you check if the following commit fixes your problem?
>
> It is already merged in stable kernel, you probably need to
> wait for a newer Fedora kernel release if it has included it.
>
> commit b057df24a7536cce6c372efe9d0e3d1558afedf4
> Author: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> Date: Tue Feb 3 19:05:18 2015 +0100
>
> cls_api.c: Fix dumping of non-existing actions' stats.
>
> In tcf_exts_dump_stats(), ensure that exts->actions is not empty before
> accessing the first element of that list and calling tcf_action_copy_stats()
> on it. This fixes some random segvs when adding filters of type
> "basic" with
> no particular action.
>
> This also fixes the dumping of those "no-action" filters, which more often
> than not made calls to tcf_action_copy_stats() fail and consequently netlink
> attributes added by the caller to be removed by a call to nla_nest_cancel().
>
> Fixes: 33be62715991 ("net_sched: act: use standard struct list_head")
> Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> Acked-by: Cong Wang <cwang@twopensource.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
I tested on:
Linux 4.0.0-rc3-ARCH-00130-g4363890 #1 SMP PREEMPT Tue Mar 17 23:11:06 EET 2015 x86_64 GNU/Linux
and got this:
$ tc filter list dev lo
filter parent 1: protocol ip pref 10 u32
filter parent 1: protocol ip pref 10 u32 fh 209: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 208: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 207: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 206: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 205: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 204: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 203: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 202: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 201: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 200: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100: ht divisor 256
filter parent 1: protocol ip pref 10 u32 fh 100::800 order 2048 key ht 100 bkt 0 link 200:
match 0a0a0000/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:1:800 order 2048 key ht 100 bkt 1 link 201:
match 0a0a0100/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:2:800 order 2048 key ht 100 bkt 2 link 202:
match 0a0a0200/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:3:800 order 2048 key ht 100 bkt 3 link 203:
match 0a0a0300/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:4:800 order 2048 key ht 100 bkt 4 link 204:
match 0a0a0400/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:5:800 order 2048 key ht 100 bkt 5 link 205:
match 0a0a0500/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:6:800 order 2048 key ht 100 bkt 6 link 206:
match 0a0a0600/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:7:800 order 2048 key ht 100 bkt 7 link 207:
match 0a0a0700/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:8:800 order 2048 key ht 100 bkt 8 link 208:
match 0a0a0800/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 100:9:800 order 2048 key ht 100 bkt 9 link 209:
match 0a0a0900/ffffff00 at 16
hash mask 000000ff at 16
filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 link 100:
match 0a0a0000/ffff0000 at 16
hash mask 0000ff00 at 16
Regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Possible bug in tc tool or kernel
2015-03-17 20:42 ` Cong Wang
2015-03-17 21:21 ` Vadim Kochan
@ 2015-03-19 14:45 ` Соловьев Сергей
2015-03-19 17:40 ` Cong Wang
1 sibling, 1 reply; 5+ messages in thread
From: Соловьев Сергей @ 2015-03-19 14:45 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev
17.03.2015 23:42, Cong Wang пишет:
> On Tue, Mar 17, 2015 at 2:57 AM, Соловьев Сергей <sol@eqv.ru> wrote:
>> Hi!
>>
>> I'm sol sorry, but English in not my native language.
>>
>> After upgrade kernel tc lost some u32 filters
>>
>> example: where is a "match ip dst 10.10.0.0/24" entries?
>>
> Can you check if the following commit fixes your problem?
>
> It is already merged in stable kernel, you probably need to
> wait for a newer Fedora kernel release if it has included it.
>
> commit b057df24a7536cce6c372efe9d0e3d1558afedf4
> Author: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> Date: Tue Feb 3 19:05:18 2015 +0100
>
> cls_api.c: Fix dumping of non-existing actions' stats.
>
> In tcf_exts_dump_stats(), ensure that exts->actions is not empty before
> accessing the first element of that list and calling tcf_action_copy_stats()
> on it. This fixes some random segvs when adding filters of type
> "basic" with
> no particular action.
>
> This also fixes the dumping of those "no-action" filters, which more often
> than not made calls to tcf_action_copy_stats() fail and consequently netlink
> attributes added by the caller to be removed by a call to nla_nest_cancel().
>
> Fixes: 33be62715991 ("net_sched: act: use standard struct list_head")
> Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> Acked-by: Cong Wang <cwang@twopensource.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Checked. This patch is applied to my kernel and not fixes this problem.
tc as part of iproute2 freshed to latest 3.19.0 version, but nothing...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Possible bug in tc tool or kernel
2015-03-19 14:45 ` Соловьев Сергей
@ 2015-03-19 17:40 ` Cong Wang
0 siblings, 0 replies; 5+ messages in thread
From: Cong Wang @ 2015-03-19 17:40 UTC (permalink / raw)
To: Соловьев Сергей
Cc: netdev
On Thu, Mar 19, 2015 at 7:45 AM, Соловьев Сергей <sol@eqv.ru> wrote:
> Checked. This patch is applied to my kernel and not fixes this problem.
>
> tc as part of iproute2 freshed to latest 3.19.0 version, but nothing...
>
>
I got the same result with Vadim, on latest net-next.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-19 17:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-17 9:57 Possible bug in tc tool or kernel Соловьев Сергей
2015-03-17 20:42 ` Cong Wang
2015-03-17 21:21 ` Vadim Kochan
2015-03-19 14:45 ` Соловьев Сергей
2015-03-19 17:40 ` Cong Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.