mbox series

[RFC,net-next,0/4] Marvell Prestera add policer support

Message ID 20210702182915.1035-1-vadym.kochan@plvision.eu
Headers show
Series Marvell Prestera add policer support | expand

Message

Vadym Kochan July 2, 2021, 6:29 p.m. UTC
From: Vadym Kochan <vkochan@marvell.com>

Offload action police when keyed to a flower classifier.
Only rate and burst is supported for now. The conform-exceed
drop is assumed as a default value.

Policer support requires FW 3.1 version. Because there are some FW ABI
differences in ACL rule messages between 3.0 and 3.1 so added separate
"_ext" struct version with separate HW helper.

Also added new __tc_classid_to_hwtc() helper which calculates hw tc
without need of netdev but specifying the num of tc instead, because
ingress HW queues are globally and statically per ASIC not per port.

Serhiy Boiko (1):
  net: marvell: prestera: Offload FLOW_ACTION_POLICE

Vadym Kochan (3):
  net: marvell: prestera: do not fail if FW reply is bigger
  net: marvell: prestera: turn FW supported versions into an array
  net: sched: introduce __tc_classid_to_hwtc() helper

 .../ethernet/marvell/prestera/prestera_acl.c  |  14 ++
 .../ethernet/marvell/prestera/prestera_acl.h  |  11 +-
 .../marvell/prestera/prestera_flower.c        |  18 +++
 .../ethernet/marvell/prestera/prestera_hw.c   | 125 +++++++++++++++++-
 .../ethernet/marvell/prestera/prestera_pci.c  |  63 ++++-----
 include/net/sch_generic.h                     |   9 +-
 6 files changed, 197 insertions(+), 43 deletions(-)

Comments

Andrew Lunn July 2, 2021, 6:52 p.m. UTC | #1
On Fri, Jul 02, 2021 at 09:29:11PM +0300, Vadym Kochan wrote:
> From: Vadym Kochan <vkochan@marvell.com>
> 
> Offload action police when keyed to a flower classifier.
> Only rate and burst is supported for now. The conform-exceed
> drop is assumed as a default value.
> 
> Policer support requires FW 3.1 version. Because there are some FW ABI
> differences in ACL rule messages between 3.0 and 3.1 so added separate
> "_ext" struct version with separate HW helper.

This driver is less than a year old, and it is on its third ABI break?
It is accumulating more and more cruft as you need to handle old and
new messages. Maybe you should take a harder look into your crystal
ball and try to figure out an ABI which you can use for 12 months or
more? Or just directly address the hardware, and skip the firmware?

      Andrew