Re: [net v3 2/3] net: sched: add check tc_skip_classify in sch egress
From: Tonghao Zhang <hidden>
Date: 2021-12-01 10:59:05
On Tue, Nov 30, 2021 at 9:24 AM Tonghao Zhang [off-list ref] wrote:
On Tue, Nov 30, 2021 at 1:44 AM Eric Dumazet [off-list ref] wrote:quoted
On Sun, Nov 28, 2021 at 8:55 PM [off-list ref] wrote:quoted
From: Tonghao Zhang <redacted> Try to resolve the issues as below: * We look up and then check tc_skip_classify flag in net sched layer, even though skb don't want to be classified. That case may consume a lot of cpu cycles. Install the rules as below: $ for id in $(seq 1 100); do $ tc filter add ... egress prio $id ... action mirred egress redirect dev ifb0 $ done netperf: $ taskset -c 1 netperf -t TCP_RR -H ip -- -r 32,32 $ taskset -c 1 netperf -t TCP_STREAM -H ip -- -m 32 Before: 10662.33 tps, 108.95 Mbit/s After: 12434.48 tps, 145.89 Mbit/s For TCP_RR, there are 16.6% improvement, TCP_STREAM 33.9%.These numbers mean nothing, really. I think you should put 10,000 filters instead of 100 so that the numbers look even better ?This 100 filters with different prio, I will install 10,000 filters and test again. Thanks.
Hi Eric I install 10,000 filters with different prio: for example tc filter add dev enp5s0f0 egress protocol ip prio 10000 flower skip_hw src_ip 4.4.39.16 action mirred egress redirect dev ifb0 Test test commands: taskset -c 1 netperf -t TCP_RR -L 4.4.39.16 -H 4.4.200.200 -- -r 32,32 taskset -c 1 netperf -t TCP_STREAM -L 4.4.39.16 -H 4.4.200.200 -- -m 32 Without patch: 152.04 tps 0.58 10^6bits/sec With patch: 303.07 tps 1.51 10^6bits/sec
quoted
As a matter of fact, you add yet another check in fast path. For some reason I have not received the cover letter and patch 1/3.1/3 patch, https://patchwork.kernel.org/project/netdevbpf/patch/20211129045503.20217-1-xiangxia.m.yue@gmail.com/ -- Best regards, Tonghao
-- Best regards, Tonghao