summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/reg.h
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2017-08-24 08:40:08 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-24 09:33:16 -0700
commit7cfcbc7591e30aeebbfd3f7b0ff615b5ee4f1da7 (patch)
tree9f5113342a4a488063f8fb20ffb0f81564736d1e /drivers/net/ethernet/mellanox/mlxsw/reg.h
parent6bba7e20da12022efb24b5ed2991c904fde9c8e1 (diff)
downloadlinux-stable-7cfcbc7591e30aeebbfd3f7b0ff615b5ee4f1da7.tar.gz
linux-stable-7cfcbc7591e30aeebbfd3f7b0ff615b5ee4f1da7.tar.bz2
linux-stable-7cfcbc7591e30aeebbfd3f7b0ff615b5ee4f1da7.zip
mlxsw: spectrum_router: Add support for setting counters on neighbors
Add support for setting counters on neighbors based on dpipe's host table counter status. This patch also adds the ability for getting the counter value, which will be used by the dpipe host table implementation in the next patches. Signed-off-by: Arkadi Sharshevsky <arkadis@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/reg.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/reg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index bcf55f6f94f3..11e290c34aaf 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -5054,6 +5054,14 @@ static inline void mlxsw_reg_rauht_pack6(char *payload,
mlxsw_reg_rauht_dip6_memcpy_to(payload, dip);
}
+static inline void mlxsw_reg_rauht_pack_counter(char *payload,
+ u64 counter_index)
+{
+ mlxsw_reg_rauht_counter_index_set(payload, counter_index);
+ mlxsw_reg_rauht_counter_set_type_set(payload,
+ MLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS_BYTES);
+}
+
/* RALEU - Router Algorithmic LPM ECMP Update Register
* ---------------------------------------------------
* The register enables updating the ECMP section in the action for multiple