aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2021-03-16 17:02:58 +0200
committerDavid S. Miller <davem@davemloft.net>2021-03-16 15:32:22 -0700
commit90f53c53ec4acaa86055f4d2e98767eeb735b42d (patch)
treea5411e9d2e145bc71fd7527af64e2aef23527911 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentmlxsw: spectrum: Track sampling triggers in a hash table (diff)
downloadlinux-dev-90f53c53ec4acaa86055f4d2e98767eeb735b42d.tar.xz
linux-dev-90f53c53ec4acaa86055f4d2e98767eeb735b42d.zip
mlxsw: spectrum: Start using sampling triggers hash table
Start using the previously introduced sampling triggers hash table to store sampling parameters instead of storing them as attributes of the sampled port. This makes it easier to introduce new sampling triggers. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.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.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 877d17f42e4a..4b4d643abceb 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -253,14 +253,6 @@ struct mlxsw_sp_sample_params {
bool truncate;
};
-struct mlxsw_sp_port_sample {
- struct psample_group *psample_group;
- u32 trunc_size;
- u32 rate;
- bool truncate;
- int span_id; /* Relevant for Spectrum-2 onwards. */
-};
-
struct mlxsw_sp_bridge_port;
struct mlxsw_sp_fid;
@@ -324,7 +316,6 @@ struct mlxsw_sp_port {
struct mlxsw_sp_port_xstats xstats;
struct delayed_work update_dw;
} periodic_hw_stats;
- struct mlxsw_sp_port_sample __rcu *sample;
struct list_head vlans_list;
struct mlxsw_sp_port_vlan *default_vlan;
struct mlxsw_sp_qdisc_state *qdisc;
@@ -1092,6 +1083,11 @@ struct mlxsw_sp_mall_trap_entry {
int span_id;
};
+struct mlxsw_sp_mall_sample_entry {
+ struct mlxsw_sp_sample_params params;
+ int span_id; /* Relevant for Spectrum-2 onwards. */
+};
+
struct mlxsw_sp_mall_entry {
struct list_head list;
unsigned long cookie;
@@ -1101,7 +1097,7 @@ struct mlxsw_sp_mall_entry {
union {
struct mlxsw_sp_mall_mirror_entry mirror;
struct mlxsw_sp_mall_trap_entry trap;
- struct mlxsw_sp_port_sample sample;
+ struct mlxsw_sp_mall_sample_entry sample;
};
struct rcu_head rcu;
};