Skip to content

nfp: flow-independent tc action hardware offload

Simon Horman netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesApplied 6/6
  2. v16 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* Make some code-style changes based on review of v1
* Change the memory allocation way from GFP_ATOMIC to GFP_KERNEL.

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6nfp: refactor policer config to support ingress/egress meterdrivers/net/ethernet/netronome/nfp/flower/main.h drivers/net/ethernet/netronome/nfp/flower/qos_conf.c+56 -200 repliesApplied
2/6nfp: add support to offload tc action to hardwaredrivers/net/ethernet/netronome/nfp/flower/main.h drivers/net/ethernet/netronome/nfp/flower/offload.c drivers/net/ethernet/netronome/nfp/flower/qos_conf.c+121 -10 repliesApplied
3/6nfp: add hash table to store meter tabledrivers/net/ethernet/netronome/nfp/flower/main.h drivers/net/ethernet/netronome/nfp/flower/qos_conf.c+176 -10 repliesApplied
4/6nfp: add process to get action stats from hardwaredrivers/net/ethernet/netronome/nfp/flower/main.h drivers/net/ethernet/netronome/nfp/flower/qos_conf.c+114 -50 repliesApplied
5/6nfp: add support to offload police action from flower tabledrivers/net/ethernet/netronome/nfp/flower/action.c drivers/net/ethernet/netronome/nfp/flower/cmsg.h drivers/net/ethernet/netronome/nfp/flower/main.h +1 more+68 -10 repliesApplied
6/6nfp: add NFP_FL_FEATS_QOS_METER to host features to enable meter offloaddrivers/net/ethernet/netronome/nfp/flower/main.h+2 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 0/6] 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

Changes between v1 and v2:
* Make some code-style changes based on review of v1
* Change the memory allocation way from GFP_ATOMIC to GFP_KERNEL.

Baowen Zheng (6):
nfp: refactor policer config to support ingress/egress meter
nfp: add support to offload tc action to hardware
nfp: add hash table to store meter table
nfp: add process to get action stats from hardware
nfp: add support to offload police action from flower table
nfp: add NFP_FL_FEATS_QOS_METER to host features to enable meter
offload

 .../ethernet/netronome/nfp/flower/action.c    |  58 +++
 .../net/ethernet/netronome/nfp/flower/cmsg.h  |   7 +
 .../net/ethernet/netronome/nfp/flower/main.h  |  49 +-
 .../ethernet/netronome/nfp/flower/offload.c   |  16 +-
 .../ethernet/netronome/nfp/flower/qos_conf.c  | 430 +++++++++++++++++-
 5 files changed, 534 insertions(+), 26 deletions(-)
Signature · 1 line
2.30.2