OSDN Git Service

net: microchip: sparx5: Add TC template support
authorSteen Hegelund <steen.hegelund@microchip.com>
Tue, 7 Mar 2023 13:41:03 +0000 (14:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Mar 2023 13:19:43 +0000 (13:19 +0000)
commite1d597ecbe5c5d7128630d4c9ec27c42018613ed
treec42a157a21901db39c44a5e32a99b2353ad45be6
parentd9f175b0dffbf70add634319a81d683be782c2e1
net: microchip: sparx5: Add TC template support

This adds support for using the "template add" and "template destroy"
functionality to change the port keyset configuration.

If the VCAP lookup already contains rules, the port keyset is left
unchanged, as a change would make these rules unusable.

When the template is destroyed the port keyset configuration is restored.
The filters using the template chain will automatically be deleted by the
TC framework.

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c