summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorArkadi Sharshevsky2017-03-11 09:42:51 +0100
committerDavid S. Miller2017-03-13 07:50:13 +0100
commitff7b0d27208bd730aa71bd91087f0ff80ca60eda (patch)
tree53e374c94dee2e95943a880d433953d372b81b20 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentdrop_monitor: use setup_timer (diff)
downloadkernel-qcow2-linux-ff7b0d27208bd730aa71bd91087f0ff80ca60eda.tar.gz
kernel-qcow2-linux-ff7b0d27208bd730aa71bd91087f0ff80ca60eda.tar.xz
kernel-qcow2-linux-ff7b0d27208bd730aa71bd91087f0ff80ca60eda.zip
mlxsw: spectrum: Add support for counter allocator
Add implementation for counter allocator. The ASIC has special memory pool for various counting purposes. Counter memory is distributed between equal size banks. The static sub-pool configuration should specify the following parameters for each sub-pool: - Number of required banks. - Maximum entry size. Each module can add dedicated sub-pool or use existing one. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 3bc1b0998654..dd59a9bf9085 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -246,6 +246,7 @@ struct mlxsw_sp_router {
};
struct mlxsw_sp_acl;
+struct mlxsw_sp_counter_pool;
struct mlxsw_sp {
struct {
@@ -281,6 +282,7 @@ struct mlxsw_sp {
DECLARE_BITMAP(usage, MLXSW_SP_KVD_LINEAR_SIZE);
} kvdl;
+ struct mlxsw_sp_counter_pool *counter_pool;
struct {
struct mlxsw_sp_span_entry *entries;
int entries_count;