diff options
| author | Steen Hegelund <steen.hegelund@microchip.com> | 2023-01-14 14:42:40 +0100 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2023-01-16 13:45:17 +0000 |
| commit | 784c3067d094dde6b7090ead51f2c9b56620409b (patch) | |
| tree | 87ed668fe23c483d22a99982388cb83f3430b3a7 /drivers/net/ethernet/microchip/vcap/vcap_api_client.h | |
| parent | net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups (diff) | |
| download | linux-784c3067d094dde6b7090ead51f2c9b56620409b.tar.gz linux-784c3067d094dde6b7090ead51f2c9b56620409b.zip | |
net: microchip: vcap api: Check chains when adding a tc flower filter
This changes the way the chain information verified when adding a new tc
flower filter.
When adding a flower filter it is now checked that the filter contains a
goto action to one of the IS2 VCAP lookups, except for the last lookup
which may omit this goto action.
It is also checked if you attempt to add multiple matchall filters to
enable the same VCAP lookup. This will be rejected.
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>
Diffstat (limited to 'drivers/net/ethernet/microchip/vcap/vcap_api_client.h')
| -rw-r--r-- | drivers/net/ethernet/microchip/vcap/vcap_api_client.h | 2 |
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 e07dc8d3c639..f44228436051 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, int vcap_lookup_rule_by_cookie(struct vcap_control *vctrl, u64 cookie); /* 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 */ +bool vcap_is_last_chain(struct vcap_control *vctrl, int cid); /* Provide all rules via a callback interface */ int vcap_rule_iter(struct vcap_control *vctrl, int (*callback)(void *, struct vcap_rule *), void *arg); |
