From 7de1dcadfaf9ada0d205fd50e3b0bde0e11e625b Mon Sep 17 00:00:00 2001 From: Steen Hegelund Date: Wed, 9 Nov 2022 12:41:11 +0100 Subject: net: microchip: sparx5: Find VCAP lookup from chain id Add a helper function that finds the lookup index in a VCAP instance from the chain id. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller --- drivers/net/ethernet/microchip/vcap/vcap_api_client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ethernet/microchip/vcap/vcap_api_client.h') diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_client.h b/drivers/net/ethernet/microchip/vcap/vcap_api_client.h index 577395402a9a..7d9a227ef834 100644 --- a/drivers/net/ethernet/microchip/vcap/vcap_api_client.h +++ b/drivers/net/ethernet/microchip/vcap/vcap_api_client.h @@ -184,6 +184,8 @@ int vcap_rule_add_action_u32(struct vcap_rule *rule, enum vcap_action_field action, u32 value); /* VCAP lookup operations */ +/* Convert a chain id to a VCAP lookup index */ +int vcap_chain_id_to_lookup(struct vcap_admin *admin, int cur_cid); /* Lookup a vcap instance using chain id */ struct vcap_admin *vcap_find_admin(struct vcap_control *vctrl, int cid); /* Find information on a key field in a rule */ -- cgit v1.2.3