linux-yocto/drivers/net/ethernet/microchip/vcap
Steen Hegelund cfd9e7b74a net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups
This adds both the source and destination chain id to the information kept
for enabled port lookups.
This allows enabling and disabling a chain of lookups by walking the chain
information for a port.

This changes the way that VCAP lookups are enabled from userspace: instead
of one matchall rule that enables all the 4 Sparx5 IS2 lookups, you need a
matchall rule per lookup.

In practice that is done by adding one matchall rule in chain 0 to goto IS2
Lookup 0, and then for each lookup you add a rule per lookup (low priority)
that does a goto to the next lookup chain.

Examples:

If you want IS2 Lookup 0 to be enabled you add the same matchall filter as
before:

tc filter add dev eth12 ingress chain 0 prio 1000 handle 1000 matchall \
       skip_sw action goto chain 8000000

If you also want to enable lookup 1 to 3 in IS2 and chain them you need
to add the following matchall filters:

tc filter add dev eth12 ingress chain 8000000 prio 1000 handle 1000 \
    matchall skip_sw action goto chain 8100000

tc filter add dev eth12 ingress chain 8100000 prio 1000 handle 1000 \
    matchall skip_sw action goto chain 8200000

tc filter add dev eth12 ingress chain 8200000 prio 1000 handle 1000 \
    matchall skip_sw action goto chain 8300000

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-01-16 13:45:17 +00:00
..
Kconfig net: microchip: sparx5: Add VCAP debugfs KUNIT test 2022-11-21 11:33:02 +00:00
Makefile net: microchip: sparx5: Add VCAP debugFS support 2022-11-21 11:33:02 +00:00
vcap_ag_api.h net: microchip: vcap: Extend vcap with lan966x 2022-11-29 13:08:23 +01:00
vcap_api_client.h net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups 2023-01-16 13:45:17 +00:00
vcap_api_debugfs_kunit.c net: microchip: vcap api: Always enable VCAP lookups 2023-01-16 13:45:16 +00:00
vcap_api_debugfs.c net: microchip: vcap: Fix initialization of value and mask 2022-12-19 12:23:39 +00:00
vcap_api_debugfs.h net: microchip: sparx5: Add VCAP debugFS support 2022-11-21 11:33:02 +00:00
vcap_api_kunit.c net: microchip: vcap api: Always enable VCAP lookups 2023-01-16 13:45:16 +00:00
vcap_api_private.h net: microchip: vcap: Add vcap_get_rule 2022-12-06 13:26:43 +01:00
vcap_api.c net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups 2023-01-16 13:45:17 +00:00
vcap_api.h net: microchip: vcap api: Always enable VCAP lookups 2023-01-16 13:45:16 +00:00
vcap_model_kunit.c net: microchip: sparx5: Adding KUNIT test VCAP model 2022-10-24 10:37:43 +01:00
vcap_model_kunit.h net: microchip: sparx5: Adding KUNIT test VCAP model 2022-10-24 10:37:43 +01:00