]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: mscc: ocelot: offload multiple tc-flower actions in same rule
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 2 Oct 2020 12:02:20 +0000 (15:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 22:40:29 +0000 (15:40 -0700)
commitea9d1f30b128c2bc5f429b3bd822b45ac9bf5114
treea10872bda9d630a668aed69468adcf46a4248cb9
parent26d0a8edca2886ed82838510bf44b6b68613641c
net: mscc: ocelot: offload multiple tc-flower actions in same rule

At this stage, the tc-flower offload of mscc_ocelot can only delegate
rules to the VCAP IS2 security enforcement block. These rules have, in
hardware, separate bits for policing and for overriding the destination
port mask and/or copying to the CPU. So it makes sense that we attempt
to expose some more of that low-level complexity instead of simply
choosing between a single type of action.

Something similar happens with the VCAP IS1 block, where the same action
can contain enable bits for VLAN classification and for QoS
classification at the same time.

So model the action structure after the hardware description, and let
the high-level ocelot_flower.c construct an action vector from multiple
tc actions.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_vcap.c
drivers/net/ethernet/mscc/ocelot_vcap.h