From 4c00dafc59c7cc25a381abf7671b203a2fcfca71 Mon Sep 17 00:00:00 2001 From: Ido Schimmel Date: Fri, 24 Apr 2020 18:43:44 +0300 Subject: mlxsw: spectrum_span: Use 'refcount_t' for reference counting 'refcount_t' is very useful for catching over/under flows. Convert the SPAN agent objects to use it instead of 'int' for their reference count. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h') diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h index 01273e54ba20..d23abdf957fa 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -6,6 +6,7 @@ #include #include +#include #include "spectrum_router.h" @@ -43,7 +44,7 @@ struct mlxsw_sp_span_entry { const struct mlxsw_sp_span_entry_ops *ops; struct mlxsw_sp_span_parms parms; struct list_head bound_ports_list; - int ref_count; + refcount_t ref_count; int id; }; -- cgit v1.2.3