summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
diff options
context:
space:
mode:
authorIdo Schimmel2018-07-25 08:23:59 +0200
committerDavid S. Miller2018-07-26 01:46:01 +0200
commitca49544ed6ace7a1aee942a9f8e2553f9b1ddf2b (patch)
treee8f9712b107f6bb0c8ae6099a166283e2ac5ed83 /drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
parentmlxsw: spectrum_acl: Extend Spectrum-2 region struct (diff)
downloadkernel-qcow2-linux-ca49544ed6ace7a1aee942a9f8e2553f9b1ddf2b.tar.gz
kernel-qcow2-linux-ca49544ed6ace7a1aee942a9f8e2553f9b1ddf2b.tar.xz
kernel-qcow2-linux-ca49544ed6ace7a1aee942a9f8e2553f9b1ddf2b.zip
mlxsw: spectrum_acl: Allow encoding a partial key
When working with 12 key blocks in the A-TCAM, rules are split into two records, which constitute two lookups. The two records are linked using a "large entry key ID". The ID is assigned to key blocks 6 to 11 and resolved during the first lookup. The second lookup is performed using the ID and the remaining key blocks. Allow encoding a partial key so that it can be later used to check if an ID can be reused. This is done by adding two arguments to the existing encode function that specify the range of the block indexes we would like to encode. The key and mask arguments become optional, as we will not need to encode both of them all the time. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
index 2ffde915349b..18d9bfed6001 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
@@ -259,6 +259,6 @@ void mlxsw_afk_values_add_buf(struct mlxsw_afk_element_values *values,
void mlxsw_afk_encode(struct mlxsw_afk *mlxsw_afk,
struct mlxsw_afk_key_info *key_info,
struct mlxsw_afk_element_values *values,
- char *key, char *mask);
+ char *key, char *mask, int block_start, int block_end);
#endif