netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in tc of iproute2 ? Deleting single filter, deletes all the filters (apart from hashtable 800::) ...
@ 2015-08-21  5:08 Akshat Kakkar
  2015-08-21  7:08 ` Akshat Kakkar
  0 siblings, 1 reply; 2+ messages in thread
From: Akshat Kakkar @ 2015-08-21  5:08 UTC (permalink / raw)
  To: netdev

When I am trying to  delete a single tc filter, it deleting all the
filters with the same priority/preference. i.e. it is ignoring the
handle specified.

But, When I am deleting in hashtable 800: it is deleting only the
specified filter.

For example, following set of commands  create a hashtable 15: and add
2 filters to it.

tc filter add dev eth0 parent 1:0 prio 5 handle 15: protocol ip u32 divisor 256
tc filter add dev eth0 protocol ip parent 1: prio 5 handle 15:2:2 u32
ht 15:2: match ip src 10.0.0.2 flowid 1:10
tc filter add dev eth0 protocol ip parent 1: prio 5 handle 15:2:3 u32
ht 15:2: match ip src 10.0.0.3 flowid 1:10

Now following command DELETES ALL THE FILTERS, though it should only
delete FILTER 15:2:3 !
tc filter del dev eth0 protocol ip parent 1: prio 5 handle 15:2:3 u32

O/p of tc filter show eth0 is this case is blank. As all filters are deleted.


However, similar commands when executed for hashtable 800: is deleting
only the specified filter
tc filter add dev eth0 protocol ip parent 1: prio 5 handle 800:0:2 u32
ht 800:0: match ip src 10.0.0.2 flowid 1:10
tc filter add dev eth0 protocol ip parent 1: prio 5 handle 800:0:3 u32
ht 800:0: match ip src 10.0.0.3 flowid 1:10

tc filter del dev eth0 protocol ip parent 1: prio 5 handle 800:0:2 u32

Above mentioned command only deletes single filter.
O/p of tc filter show eth0 is 2nd case is

filter parent 1: protocol ip pref 5 u32
filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 5 u32 fh 800::3 order 3 key ht 800
bkt 0 flowid 1:10
  match 0a000003/ffffffff at 12

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug in tc of iproute2 ? Deleting single filter, deletes all the filters (apart from hashtable 800::) ...
  2015-08-21  5:08 Bug in tc of iproute2 ? Deleting single filter, deletes all the filters (apart from hashtable 800::) Akshat Kakkar
@ 2015-08-21  7:08 ` Akshat Kakkar
  0 siblings, 0 replies; 2+ messages in thread
From: Akshat Kakkar @ 2015-08-21  7:08 UTC (permalink / raw)
  To: netdev

I actually posted this on lartc first. But then it was suggested to
post it over here as you guys might be able to guide better.

Please help ...

On Fri, Aug 21, 2015 at 10:38 AM, Akshat Kakkar <akshat.1984@gmail.com> wrote:
> When I am trying to  delete a single tc filter, it deleting all the
> filters with the same priority/preference. i.e. it is ignoring the
> handle specified.
>
> But, When I am deleting in hashtable 800: it is deleting only the
> specified filter.
>
> For example, following set of commands  create a hashtable 15: and add
> 2 filters to it.
>
> tc filter add dev eth0 parent 1:0 prio 5 handle 15: protocol ip u32 divisor 256
> tc filter add dev eth0 protocol ip parent 1: prio 5 handle 15:2:2 u32
> ht 15:2: match ip src 10.0.0.2 flowid 1:10
> tc filter add dev eth0 protocol ip parent 1: prio 5 handle 15:2:3 u32
> ht 15:2: match ip src 10.0.0.3 flowid 1:10
>
> Now following command DELETES ALL THE FILTERS, though it should only
> delete FILTER 15:2:3 !
> tc filter del dev eth0 protocol ip parent 1: prio 5 handle 15:2:3 u32
>
> O/p of tc filter show eth0 is this case is blank. As all filters are deleted.
>
>
> However, similar commands when executed for hashtable 800: is deleting
> only the specified filter
> tc filter add dev eth0 protocol ip parent 1: prio 5 handle 800:0:2 u32
> ht 800:0: match ip src 10.0.0.2 flowid 1:10
> tc filter add dev eth0 protocol ip parent 1: prio 5 handle 800:0:3 u32
> ht 800:0: match ip src 10.0.0.3 flowid 1:10
>
> tc filter del dev eth0 protocol ip parent 1: prio 5 handle 800:0:2 u32
>
> Above mentioned command only deletes single filter.
> O/p of tc filter show eth0 is 2nd case is
>
> filter parent 1: protocol ip pref 5 u32
> filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 5 u32 fh 800::3 order 3 key ht 800
> bkt 0 flowid 1:10
>   match 0a000003/ffffffff at 12

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-21  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21  5:08 Bug in tc of iproute2 ? Deleting single filter, deletes all the filters (apart from hashtable 800::) Akshat Kakkar
2015-08-21  7:08 ` Akshat Kakkar

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).