[net-next,00/10] Adding Sparx5 ES0 VCAP support

Message ID 20230213092426.1331379-1-steen.hegelund@microchip.com
Headers
Series Adding Sparx5 ES0 VCAP support |

Message

Steen Hegelund Feb. 13, 2023, 9:24 a.m. UTC
  This provides the Egress Stage 0 (ES0) VCAP (Versatile Content-Aware
Processor) support for the Sparx5 platform.

The ES0 VCAP is an Egress Access Control VCAP that uses frame keyfields and
previously classified keyfields to add, rewrite or remove VLAN tags on the
egress frames, and is therefore often referred to as the rewriter.

The ES0 VCAP also supports trapping frames to the host.

The ES0 VCAP has 1 lookup accessible with this chain id:

- chain 10000000: ES0 Lookup 0

The ES0 VCAP does not do traffic classification to select a keyset, but it
does have two keysets that can be used on all traffic.  For now only the
ISDX keyset is used.

The ES0 VCAP can match on an ISDX key (Ingress Service Index) as one of the
frame metadata keyfields, similar to the ES2 VCAP.

The ES0 VCAP uses external counters in the XQS (statistics) group.

Steen Hegelund (10):
  net: microchip: sparx5: Discard frames with SMAC multicast addresses
  net: microchip: sparx5: Clear rule counter even if lookup is disabled
  net: microchip: sparx5: Egress VLAN TPID configuration follows IFH
  net: microchip: sparx5: Use chain ids without offsets when enabling
    rules
  net: microchip: sparx5: Improve the error handling for linked rules
  net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP
    model
  net: microchip: sparx5: Updated register interface with VCAP ES0
    access
  net: microchip: sparx5: Add ES0 VCAP keyset configuration for Sparx5
  net: microchip: sparx5: Add TC support for the ES0 VCAP
  net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP

 .../ethernet/microchip/sparx5/sparx5_main.c   |    1 +
 .../microchip/sparx5/sparx5_main_regs.h       | 1829 ++++++++++++-----
 .../ethernet/microchip/sparx5/sparx5_port.c   |    5 +
 .../net/ethernet/microchip/sparx5/sparx5_tc.h |   74 +
 .../microchip/sparx5/sparx5_tc_flower.c       |  368 +++-
 .../microchip/sparx5/sparx5_vcap_ag_api.c     |  385 +++-
 .../microchip/sparx5/sparx5_vcap_debugfs.c    |   41 +
 .../microchip/sparx5/sparx5_vcap_impl.c       |  274 +++
 .../microchip/sparx5/sparx5_vcap_impl.h       |   25 +
 .../ethernet/microchip/sparx5/sparx5_vlan.c   |    4 +-
 .../net/ethernet/microchip/vcap/vcap_ag_api.h |  174 +-
 .../net/ethernet/microchip/vcap/vcap_api.c    |   28 +-
 .../microchip/vcap/vcap_api_debugfs_kunit.c   |    4 +-
 .../ethernet/microchip/vcap/vcap_api_kunit.c  |    4 +-
 .../microchip/vcap/vcap_model_kunit.c         |  270 ++-
 .../microchip/vcap/vcap_model_kunit.h         |   10 +-
 drivers/net/ethernet/microchip/vcap/vcap_tc.c |    3 +
 drivers/net/ethernet/microchip/vcap/vcap_tc.h |    1 +
 18 files changed, 2758 insertions(+), 742 deletions(-)