mbox series

[net-next,0/8] Adding Sparx5 ES2 VCAP support

Message ID 20230127130830.1481526-1-steen.hegelund@microchip.com (mailing list archive)
Headers show
Series Adding Sparx5 ES2 VCAP support | expand

Message

Steen Hegelund Jan. 27, 2023, 1:08 p.m. UTC
This provides the Egress Stage 2 (ES2) VCAP (Versatile Content-Aware
Processor) support for the Sparx5 platform.

The ES2 VCAP is an Egress Access Control VCAP that uses frame keyfields and
previously classified keyfields to apply e.g. policing, trapping or
mirroring to frames.

The ES2 VCAP has 2 lookups and they are accessible with a TC chain id:

- chain 20000000: ES2 Lookup 0
- chain 20100000: ES2 Lookup 1

As the other Sparx5 VCAPs the ES2 VCAP has its own lookup/port keyset
configuration that decides which keys will be used for matching on which
traffic type.

The ES2 VCAP has these traffic classifications:

- IPv4 frames
- IPv6 frames
- Other frames

The ES2 VCAP can match on an ISDX key (Ingress Service Index) as one of the
frame metadata keyfields.  The IS0 VCAP can update this key using its
actions, and this allows a IS0 VCAP rule to be linked to an ES2 rule.

This is similar to how the IS0 VCAP and the IS2 VCAP use the PAG
(Policy Association Group) keyfield to link rules.

From user space this is exposed via "chain offsets", so an IS0 rule with a
"goto chain 20000015" action will use an ISDX key value of 15 to link to a
rule in the ES2 VCAP attached to the same chain id.

Steen Hegelund (8):
  net: microchip: sparx5: Add support for getting keysets without a type
    id
  net: microchip: sparx5: Improve the IP frame key match for IPv6 frames
  net: microchip: sparx5: Improve error message when parsing CVLAN
    filter
  net: microchip: sparx5: Add ES2 VCAP model and updated KUNIT VCAP
    model
  net: microchip: sparx5: Add ES2 VCAP keyset configuration for Sparx5
  net: microchip: sparx5: Add ingress information to VCAP instance
  net: microchip: sparx5: Add TC support for the ES2 VCAP
  net: microchip: sparx5: Add  KUNIT tests for enabling/disabling chains

 .../ethernet/microchip/lan966x/lan966x_main.h |    3 +-
 .../ethernet/microchip/lan966x/lan966x_tc.c   |    2 +-
 .../microchip/lan966x/lan966x_tc_flower.c     |   16 +-
 .../microchip/lan966x/lan966x_vcap_impl.c     |    3 +
 .../ethernet/microchip/sparx5/sparx5_main.c   |    1 +
 .../microchip/sparx5/sparx5_main_regs.h       |  227 +++-
 .../microchip/sparx5/sparx5_tc_flower.c       |   57 +-
 .../microchip/sparx5/sparx5_vcap_ag_api.c     | 1166 ++++++++++++++++-
 .../microchip/sparx5/sparx5_vcap_debugfs.c    |  117 ++
 .../microchip/sparx5/sparx5_vcap_impl.c       |  786 +++++++++--
 .../microchip/sparx5/sparx5_vcap_impl.h       |   34 +
 .../net/ethernet/microchip/vcap/vcap_ag_api.h |   11 +-
 .../net/ethernet/microchip/vcap/vcap_api.c    |   36 +-
 .../net/ethernet/microchip/vcap/vcap_api.h    |    1 +
 .../ethernet/microchip/vcap/vcap_api_client.h |    2 +-
 .../microchip/vcap/vcap_api_debugfs.c         |    6 +-
 .../microchip/vcap/vcap_api_debugfs_kunit.c   |    4 +
 .../ethernet/microchip/vcap/vcap_api_kunit.c  |   66 +
 .../microchip/vcap/vcap_model_kunit.c         |   14 +-
 19 files changed, 2390 insertions(+), 162 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 30, 2023, 7:40 a.m. UTC | #1
Hello:

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

On Fri, 27 Jan 2023 14:08:22 +0100 you wrote:
> This provides the Egress Stage 2 (ES2) VCAP (Versatile Content-Aware
> Processor) support for the Sparx5 platform.
> 
> The ES2 VCAP is an Egress Access Control VCAP that uses frame keyfields and
> previously classified keyfields to apply e.g. policing, trapping or
> mirroring to frames.
> 
> [...]

Here is the summary with links:
  - [net-next,1/8] net: microchip: sparx5: Add support for getting keysets without a type id
    https://git.kernel.org/netdev/net-next/c/c02b19edc78d
  - [net-next,2/8] net: microchip: sparx5: Improve the IP frame key match for IPv6 frames
    https://git.kernel.org/netdev/net-next/c/4114ef2ce273
  - [net-next,3/8] net: microchip: sparx5: Improve error message when parsing CVLAN filter
    https://git.kernel.org/netdev/net-next/c/a5300724ce73
  - [net-next,4/8] net: microchip: sparx5: Add ES2 VCAP model and updated KUNIT VCAP model
    https://git.kernel.org/netdev/net-next/c/9d712b8ddbb4
  - [net-next,5/8] net: microchip: sparx5: Add ES2 VCAP keyset configuration for Sparx5
    https://git.kernel.org/netdev/net-next/c/b95d9e2c20c9
  - [net-next,6/8] net: microchip: sparx5: Add ingress information to VCAP instance
    https://git.kernel.org/netdev/net-next/c/e7e3f514713e
  - [net-next,7/8] net: microchip: sparx5: Add TC support for the ES2 VCAP
    https://git.kernel.org/netdev/net-next/c/7b911a5311b8
  - [net-next,8/8] net: microchip: sparx5: Add KUNIT tests for enabling/disabling chains
    https://git.kernel.org/netdev/net-next/c/1f741f001160

You are awesome, thank you!