Skip to content

Add tc hardware offloads

Naveen Mamindlapalli netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4octeontx2-pf: Add ip tos and ip proto icmp/icmpv6 flow offload supportdrivers/net/ethernet/marvell/octeontx2/af/npc.h drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c+57 -40 repliesApplied
2/4octeontx2-pf: Add tc flower hardware offload on ingress trafficdrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c drivers/net/ethernet/marvell/octeontx2/nic/Makefile drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +3 more+551 -20 repliesApplied
3/4octeontx2-pf: add tc flower stats handler for hw offloadsdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c+122 -10 repliesApplied
4/4octeontx2-pf: TC_MATCHALL egress ratelimiting offloaddrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c+236 -40 repliesApplied

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/4] Add tc hardware offloads

This patch series adds support for tc hardware offloads.

Patch #1 adds support for offloading flows that matches IP tos and IP
protocol which will be used by tc hw offload support. Also added ethtool n-tuple filter to code to offload the flows matching the above fields.
Patch #2 adds tc flower hardware offload support on ingress traffic. Patch #3 adds TC flower offload stats.
Patch #4 adds tc TC_MATCHALL egress ratelimiting offload.

* tc flower hardware offload in PF driver

The driver parses the flow match fields and actions received from the tc subsystem and adds/delete MCAM rules for the same. Each flow contains set of match and action fields. If the action or fields are not supported, the rule cannot be offloaded to hardware. The tc uses same set of MCAM rules allocated for ethtool n-tuple filters. So, at a time only one entity can offload the flows to hardware, they're made mutually exclusive in the driver.

Following match and actions are supported.

Match: Eth dst_mac, EtherType, 802.1Q {vlan_id,vlan_prio}, vlan EtherType,
IP proto {tcp,udp,sctp,icmp,icmp6}, IPv4 tos, IPv4{dst_ip,src_ip}, L4 proto {dst_port|src_port number}.
Actions: drop, accept, vlan pop, redirect to another port on the device.

The Hardware stats are also supported. Currently only packet counter stats are updated.

* tc egress rate limiting support
Added TC-MATCHALL classifier offload with police action applied for all egress traffic on the specified interface.

Naveen Mamindlapalli (3):
octeontx2-pf: Add ip tos and ip proto icmp/icmpv6 flow offload support
octeontx2-pf: Add tc flower hardware offload on ingress traffic
octeontx2-pf: add tc flower stats handler for hw offloads

Sunil Goutham (1):
octeontx2-pf: TC_MATCHALL egress ratelimiting offload

 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |  14 +
 drivers/net/ethernet/marvell/octeontx2/af/npc.h    |   2 +
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    |   2 +-
 .../net/ethernet/marvell/octeontx2/af/rvu_npc.c    |  39 +
 .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c |  17 +-
 .../net/ethernet/marvell/octeontx2/nic/Makefile    |   2 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |  20 +
 .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |  47 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  37 +
 .../net/ethernet/marvell/octeontx2/nic/otx2_reg.h  |   1 +
 .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c   | 786 +++++++++++++++++++++
 11 files changed, 961 insertions(+), 6 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
Signature · 1 line
2.16.5