summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2022-12-03 11:43:47 +0100
committerPaolo Abeni <pabeni@redhat.com>2022-12-06 13:26:43 +0100
commit6009b61f80e0b87b06f56a9bf16a32b6f562f822 (patch)
treef83b7237d3a2118bc596e557f98eb4ee033cb2f2 /drivers/net/ethernet/microchip/vcap/vcap_api_client.h
parent2662b3f93d2617719e68bbb1031491461afa2812 (diff)
downloadlinux-6009b61f80e0b87b06f56a9bf16a32b6f562f822.tar.gz
linux-6009b61f80e0b87b06f56a9bf16a32b6f562f822.tar.bz2
linux-6009b61f80e0b87b06f56a9bf16a32b6f562f822.zip
net: microchip: vcap: Add vcap_rule_get_key_u32
Add the function vcap_rule_get_key_u32 which allows to get the value and the mask of a key that exist on the rule. If the key doesn't exist, it would return error. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/microchip/vcap/vcap_api_client.h')
-rw-r--r--drivers/net/ethernet/microchip/vcap/vcap_api_client.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_client.h b/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
index fdfc5d58813b..0319866f9c94 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
@@ -258,4 +258,8 @@ int vcap_rule_mod_action_u32(struct vcap_rule *rule,
enum vcap_action_field action,
u32 value);
+/* Get a 32 bit key field value and mask from the rule */
+int vcap_rule_get_key_u32(struct vcap_rule *rule, enum vcap_key_field key,
+ u32 *value, u32 *mask);
+
#endif /* __VCAP_API_CLIENT__ */