I am doing an tc experiment between two servers. When no tc rules are added, the bandwith between the two servers is about 7Gbps tested with iperf3.
Then I add a tc filter based on HTB for testing. When the rate limit i set is less than 300Mbps or 350Mbps, the test result is as expected.
But when the rate limit value is greater than 350Mbps, such as 500Mbps or 1Gbps, the bandwidth value between the two servers is still around 350Mbps tested with iperf3.
Am I using the tc filter incorrectly? Should tc filter be used in combination with tc class?
I am using the following TC commands. The strange thing is, no matter what the rate limit value is set in the ingress direction, it can achieve the expected,but HTB can not. The results presented are the same when using ipv4 or ipv6.
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all prio 1 u32 match ip6 dst 2408:8:8:6::16 police rate 1000000kbit burst 800000kbit mtu 64k drop flowid :1
tc qdisc add dev eth0 root handle 1: htb
tc filter add dev eth0 parent 1: protocol all prio 1 u32 match ip6 src 2408:8:8:6::16 police rate 500000kbit burst 400000kbit mtu 64k drop flowid :1
Thank you for your help