Problem with tc hashing filters

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

 



Hello.

I'm using kernel 2.6.21.5 with iproute2-2.6.20-070313 and have two big problems with hashing filters. First, tc doesn't check that filter with the same rules already exists and always appends one more. Second, filters can't be properly deleted.

Example 1:
I assume that all corresponding classes and qdiscs were created. If you execute these two commands several times.

# tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 800:: \
match ip src 172.19.0.0/24 \
hashkey mask 0x000000ff at 12 link 1:

# tc filter add dev eth1 protocol ip parent 1: prio 5 u32 ht 01:03: match ip dst 172.19.0.3 flowid 1:10

you will see no error messages about existence of the same filter.

Command

# tc -d filter show dev eth1

gives the following

filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 1: ht divisor 256
filter parent 1: protocol ip pref 1 u32 fh 1:3:800 order 2048 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 1:3:801 order 2049 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 1:3:802 order 2050 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 link 1:
  match ac130000/ffffff00 at 16
    hash mask 000000ff at 16
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0 link 1:
  match ac130000/ffffff00 at 16
    hash mask 000000ff at 16
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0 link 1:
  match ac130000/ffffff00 at 16
    hash mask 000000ff at 16
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0 link 1:
  match ac130000/ffffff00 at 16
    hash mask 000000ff at 16
filter parent 1: protocol ip pref 5 u32
filter parent 1: protocol ip pref 5 u32 fh 803: ht divisor 1

Example 2:

Let's try to delete the filter with this command:
# tc filter del dev eth1 protocol ip parent 1: prio 5 u32 ht 01:03: match ip dst 172.19.0.3 flowid 1:10

First time it gives no error messages, but
# tc -d filter show dev eth1

shows that all filters are still here:

filter parent 1: protocol ip pref 1 u32 fh 1:3:800 order 2048 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 1:3:801 order 2049 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 1:3:802 order 2050 key ht 1 bkt 3 flowid 1:10
  match ac130003/ffffffff at 16

If you try to give "tc filter del" command again it shows an error message.
RNETLINK answers: No such file or directory
We have an error talking to the kernel.

But "tc filter show dev eth1" still shows that no filters were deleted.

Thanks for attention.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux