mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] Add support for TC flower templates in Sparx5
@ 2023-03-07 13:40 Steen Hegelund
  2023-03-07 13:40 ` [PATCH net-next 1/5] net: microchip: sparx5: Correct the spelling of the keysets in debugfs Steen Hegelund
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Steen Hegelund @ 2023-03-07 13:40 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Steen Hegelund, UNGLinuxDriver, linux-kernel, netdev,
	linux-arm-kernel, Steen Hegelund, Daniel Machon, Horatiu Vultur,
	Lars Povlsen, Russell King, Randy Dunlap, Casper Andersson,
	Nathan Huckleberry, Dan Carpenter, Michael Walle, Wan Jiabing,
	Qiheng Lin, Shang XiaoJing, Simon Horman

This adds support for the TC template mechanism in the Sparx5 flower filter
implementation.

Templates are as such handled by the TC framework, but when a template is
created (using a chain id) there are by definition no filters on this
chain (an error will be returned if there are any).

If the templates chain id is one that is represented by a VCAP lookup, then
when the template is created, we know that it is safe to use the keys
provided in the template to change the keyset configuration for the (port,
lookup) combination, if this is needed to improve the match on the
template.

The original port keyset configuration is captured in the template state
information which is kept per port, so that when the template is deleted
the port keyset configuration can be restored to its previous setting.

The template also provides the protocol parameter which is the basic
information that is used to find out which port keyset configuration needs
to be changed.

The VCAPs and lookups are slightly different when it comes to which keys,
keysets and protocol are supported and used for selection, so in some
cases a bit of tweaking is needed to find a useful match.  This is done by
e.g. removing a key that prevents the best matching keyset from being
selected.

The debugfs output that is provided for a port allows inspection of the
currently used keyset in each of the VCAPs lookups.  So when a template has
been created the debugfs output allows you to verify if the keyset
configuration has been changed successfully.

Steen Hegelund (5):
  net: microchip: sparx5: Correct the spelling of the keysets in debugfs
  net: microchip: sparx5: Provide rule count, key removal and keyset
    select
  net: microchip: sparx5: Add TC template list to a port
  net: microchip: sparx5: Add port keyset changing functionality
  net: microchip: sparx5: Add TC template support

 .../ethernet/microchip/sparx5/sparx5_main.c   |   1 +
 .../ethernet/microchip/sparx5/sparx5_main.h   |   1 +
 .../microchip/sparx5/sparx5_tc_flower.c       | 209 +++++++++++++-
 .../microchip/sparx5/sparx5_vcap_debugfs.c    |   2 +-
 .../microchip/sparx5/sparx5_vcap_impl.c       | 270 ++++++++++++++++++
 .../microchip/sparx5/sparx5_vcap_impl.h       |   6 +
 .../net/ethernet/microchip/vcap/vcap_api.c    |  61 ++++
 .../ethernet/microchip/vcap/vcap_api_client.h |  11 +
 8 files changed, 553 insertions(+), 8 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-07 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 13:40 [PATCH net-next 0/5] Add support for TC flower templates in Sparx5 Steen Hegelund
2023-03-07 13:40 ` [PATCH net-next 1/5] net: microchip: sparx5: Correct the spelling of the keysets in debugfs Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 2/5] net: microchip: sparx5: Provide rule count, key removal and keyset select Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 3/5] net: microchip: sparx5: Add TC template list to a port Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 4/5] net: microchip: sparx5: Add port keyset changing functionality Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 5/5] net: microchip: sparx5: Add TC template support Steen Hegelund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®