Bug 202297

Summary: No longer able to add multiple tc filters. RTNETLINK answers: No space left on device (Error is with radix tree algorithm)
Product: Networking Reporter: Herb Alpert (kbocharnikov)
Component: Netfilter/IptablesAssignee: Stephen Hemminger (stephen)
Status: RESOLVED INVALID    
Severity: blocking    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.20.2 Subsystem:
Regression: No Bisected commit-id:

Description Herb Alpert 2019-01-15 19:20:22 UTC
This is working in 4.5.5 and is not working in 4.18.12 onward. Not sure about the versions in between:

example: 
# tc filter add dev ipenc0 parent 1:0 handle ::102 protocol ip prio 1 u32 match ip dst 224.44.44.4/32 flowid 1:5

//successfull, now every other addition will not be:

# tc filter add dev ipenc0 parent 2:0 handle ::102 protocol ip prio 1 u32 match ip dst 224.44.44.4/32 flowid 2:102
RTNETLINK answers: No space left on device
We have an error talking to the kernel



This appears to be almost the same bug that was supposedly fixed, but does not appear to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1797669
Comment 1 Herb Alpert 2019-01-18 18:14:39 UTC
This has something to do with the radix tree thing that was introduced. It is unable to extend the tree past the root node. So the first rule goes in, but any additional ones: idr_get_free (/lib/radix-tree.c) returns ENOSPC
Comment 2 Herb Alpert 2019-01-18 21:09:46 UTC
Copy/pasted incorrect 2nd command above, in order to replicate:

# tc filter add dev ipenc0 parent 1:0 handle ::102 protocol ip prio 1 u32 match ip dst 224.44.44.4/32 flowid 1:5

This Works, but now the next one(s) will not:

# tc filter add dev ipenc0 parent 1:0 handle ::102 protocol ip prio 1 u32 match ip dst 224.22.22.2/32 flowid 1:5