aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
diff options
context:
space:
mode:
authorSteen Hegelund <steen.hegelund@microchip.com>2023-01-24 11:45:08 +0100
committerPaolo Abeni <pabeni@redhat.com>2023-01-26 10:07:44 +0100
commit88bd9ea70b2ec59298125ff2bf9837034d73e3b7 (patch)
tree3eb0569ca66b1437ff43cd07640a4addb3140235 /drivers/net/ethernet/microchip/vcap/vcap_api_client.h
parentnet: microchip: sparx5: Add TC support for IS0 VCAP (diff)
downloadwireguard-linux-88bd9ea70b2ec59298125ff2bf9837034d73e3b7.tar.xz
wireguard-linux-88bd9ea70b2ec59298125ff2bf9837034d73e3b7.zip
net: microchip: sparx5: Add TC filter chaining support for IS0 and IS2 VCAPs
This allows rules to be chained between VCAP instances, e.g. from IS0 Lookup 0 to IS0 Lookup 1, or from one of the IS0 Lookups to one of the IS2 Lookups. Chaining from an IS2 Lookup to another IS2 Lookup is not supported in the hardware. Signed-off-by: Steen Hegelund <steen.hegelund@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.h2
1 files changed, 2 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 2cdcd3b56b30..69ea230ba8a1 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_client.h
@@ -217,6 +217,8 @@ const struct vcap_field *vcap_lookup_keyfield(struct vcap_rule *rule,
enum vcap_key_field key);
/* Find a rule id with a provided cookie */
int vcap_lookup_rule_by_cookie(struct vcap_control *vctrl, u64 cookie);
+/* Calculate the value used for chaining VCAP rules */
+int vcap_chain_offset(struct vcap_control *vctrl, int from_cid, int to_cid);
/* Is the next chain id in the following lookup, possible in another VCAP */
bool vcap_is_next_lookup(struct vcap_control *vctrl, int cur_cid, int next_cid);
/* Is this chain id the last lookup of all VCAPs */