Re: [PATCH net-next 3/3] net: ethernet: ti: am65-cpsw: enable broadcast/multicast rate limit support

From: Andrew Lunn
Date: Mon Nov 16 2020 - 18:30:49 EST


> Same as above, just in packets per second.
>
> tc qdisc add dev eth0 clsact
> tc filter add dev eth0 ingress flower skip_sw \
> dst_mac 01:00:00:00:00:00/01:00:00:00:00:00 \
> action police rate 20kpps

I agree with Vladimir here. Since the hardware does PPS limits, the TC
API should also be PPS limit based. And as you said, CPU load is more
a factor of PPS than BPS, so it is a useful feature in general to
have. You just need to implement the software version first, before
you offload it to the hardware.

Andrew