Subject: Re: [PATCH net-next 1/2] cxgb4: add TC-MATCHALL classifier egress offload

From: Jakub Kicinski <[email-masked]>
Date: Wed, 13 Nov 2019 19:14:02 -0800

On Wed, 13 Nov 2019 20:09:20 +0530, Rahul Lakkireddy wrote:
> Add TC-MATCHALL classifier offload with TC-POLICE action applied for all
> outgoing traffic on the underlying interface. Split flow block offload
> to support both egress and ingress classification.
> 
> For example, to rate limit all outgoing traffic to 1 Gbps:
> 
> $ tc qdisc add dev enp2s0f4 clsact
> $ tc filter add dev enp2s0f4 egress matchall skip_sw \
> 	action police rate 1Gbit burst 8Kbit
> 
> Note that skip_sw is important. Otherwise, both stack and hardware
> will end up doing policing. 

You also can't offload policers from shared blocks (well, shared
actions in general, but let's say checking shared blocks is enough).

> Only 1 egress matchall rule can be active
> at a time on the underlying interface.
> 
> Signed-off-by: Rahul Lakkireddy <[email-masked]>