]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'nfp-flow-independent-tc-action-hardware-offload'
authorJakub Kicinski <kuba@kernel.org>
Fri, 25 Feb 2022 05:51:10 +0000 (21:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Feb 2022 05:51:11 +0000 (21:51 -0800)
commit1d1a176d91b044aec1b46e0d0f11ded8753f3342
tree94ac6a77bffd6f8b4d3ddb8f0338ebcc8856a644
parent1ded5af4601af9afc5f02c6c73845f516d472cd6
parent286451283bff7011434a898941d99c5b0cd42913
Merge branch 'nfp-flow-independent-tc-action-hardware-offload'

Simon Horman says:

====================
nfp: flow-independent tc action hardware offload

Baowen Zheng says:

Allow nfp NIC to offload tc actions independent of flows.

The motivation for this work is to offload tc actions independent of flows
for nfp NIC. We allow nfp driver to provide hardware offload of OVS
metering feature - which calls for policers that may be used by multiple
flows and whose lifecycle is independent of any flows that use them.

When nfp driver tries to offload a flow table using the independent action,
the driver will search if the action is already offloaded to the hardware.
If not, the flow table offload will fail.

When the nfp NIC successes to offload an action, the user can check
in_hw_count when dumping the tc action.

Tc cli command to offload and dump an action:

 # tc actions add action police rate 100mbit burst 10000k index 200 skip_sw

 # tc -s -d actions list action police

 total acts 1

      action order 0:  police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action reclassify
      overhead 0b linklayer ethernet
      ref 1 bind 0  installed 142 sec used 0 sec
      Action statistics:
      Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      backlog 0b 0p requeues 0
      skip_sw in_hw in_hw_count 1
      used_hw_stats delayed
====================

Link: https://lore.kernel.org/r/20220223162302.97609-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>