Skip to content
Commit 17b96a5c authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller
Browse files

mlxsw: spectrum: Veto sampling if already enabled on port

The per-port sampling triggers (i.e., ingress / egress) cannot be
enabled twice. Meaning, the below configuration will not result in
packets being sampled twice:

 # tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1
 # tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1

Therefore, reject such configurations.

Fixes: 90f53c53

 ("mlxsw: spectrum: Start using sampling triggers hash table")
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3572a0b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment