mbox series

[net-next,v2,0/4] TC protocol all support in Sparx5 IS2 VCAP

Message ID 20221123152545.1997266-1-steen.hegelund@microchip.com (mailing list archive)
Headers show
Series TC protocol all support in Sparx5 IS2 VCAP | expand

Message

Steen Hegelund Nov. 23, 2022, 3:25 p.m. UTC
This provides support for the TC flower filters 'protocol all' clause in
the Sparx5 IS2 VCAP.

It builds on top of the initial IS2 VCAP support found in these series:

https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/
https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/
https://lore.kernel.org/all/20221111130519.1459549-1-steen.hegelund@microchip.com/
https://lore.kernel.org/all/20221117213114.699375-1-steen.hegelund@microchip.com/

Functionality:
==============

As the configuration for the Sparx5 IS2 VCAP consists of one (or more)
keyset(s) for each lookup/port per traffic classification, it is not
always possible to cover all protocols with just one ordinary VCAP rule.

To improve this situation the driver will try to find out what keysets a
rule will need to cover a TC flower "protocol all" filter and then compare
this set of keysets to what the hardware is currently configured for.

In case multiple keysets are needed then the driver can create a rule per
rule size (e.g. X6 and X12) and use a mask on the keyset type field to
allow the VCAP to match more than one keyset with just one rule.

This is possible because the keysets that have the same size typically has
many keys in common, so the VCAP rule keys can make a common match.

The result is that one TC filter command may create multiple IS2 VCAP rules
of different sizes that have a type field with a masked type id.

Delivery:
=========

This is current plan for delivering the full VCAP feature set of Sparx5:

- Sparx5 IS0 VCAP support
- TC policer and drop action support (depends on the Sparx5 QoS support
  upstreamed separately)
- Sparx5 ES0 VCAP support
- TC flower template support
- TC matchall filter support for mirroring and policing ports
- TC flower filter mirror action support
- Sparx5 ES2 VCAP support

Version History:
================
v2      Fixed a NULL return value compiler warning.
        Moved the new vcap_find_actionfield function a bit up in the file.

v1      Initial version


Steen Hegelund (4):
  net: microchip: sparx5: Support for copying and modifying rules in the
    API
  net: microchip: sparx5: Support for TC protocol all
  net: microchip: sparx5: Support for displaying a list of keysets
  net: microchip: sparx5: Add VCAP filter keys KUNIT test

 .../microchip/sparx5/sparx5_tc_flower.c       | 209 +++++++++++++++++-
 .../microchip/sparx5/sparx5_vcap_impl.c       |  18 +-
 .../microchip/sparx5/sparx5_vcap_impl.h       |  13 ++
 .../net/ethernet/microchip/vcap/vcap_api.c    | 185 +++++++++++++++-
 .../ethernet/microchip/vcap/vcap_api_client.h |  22 +-
 .../microchip/vcap/vcap_api_debugfs.c         |  98 ++++----
 .../microchip/vcap/vcap_api_debugfs_kunit.c   |  20 +-
 .../ethernet/microchip/vcap/vcap_api_kunit.c  | 200 ++++++++++++++++-
 .../microchip/vcap/vcap_api_private.h         |   4 -
 9 files changed, 708 insertions(+), 61 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 25, 2022, 9:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 23 Nov 2022 16:25:41 +0100 you wrote:
> This provides support for the TC flower filters 'protocol all' clause in
> the Sparx5 IS2 VCAP.
> 
> It builds on top of the initial IS2 VCAP support found in these series:
> 
> https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/
> https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/
> https://lore.kernel.org/all/20221111130519.1459549-1-steen.hegelund@microchip.com/
> https://lore.kernel.org/all/20221117213114.699375-1-steen.hegelund@microchip.com/
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/4] net: microchip: sparx5: Support for copying and modifying rules in the API
    https://git.kernel.org/netdev/net-next/c/465a38a269e9
  - [net-next,v2,2/4] net: microchip: sparx5: Support for TC protocol all
    https://git.kernel.org/netdev/net-next/c/0ca609484877
  - [net-next,v2,3/4] net: microchip: sparx5: Support for displaying a list of keysets
    https://git.kernel.org/netdev/net-next/c/14b639caa6e4
  - [net-next,v2,4/4] net: microchip: sparx5: Add VCAP filter keys KUNIT test
    https://git.kernel.org/netdev/net-next/c/22f3c3257288

You are awesome, thank you!