aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2021-03-16 17:02:57 +0200
committerDavid S. Miller <davem@davemloft.net>2021-03-16 15:32:22 -0700
commit1b9fc42e46dfea0efa39165d906b0f6a05d6b558 (patch)
treeef2b9f3923a865b837e81d2f4a78d1984d5c392f /drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
parentmlxsw: spectrum_matchall: Pass matchall entry to sampling operations (diff)
downloadwireguard-linux-1b9fc42e46dfea0efa39165d906b0f6a05d6b558.tar.xz
wireguard-linux-1b9fc42e46dfea0efa39165d906b0f6a05d6b558.zip
mlxsw: spectrum: Track sampling triggers in a hash table
Currently, mlxsw supports a single sampling trigger type (i.e., received packet). When sampling is configured on an ingress port, the sampling parameters (e.g., pointer to the psample group) are stored as an attribute of the port, so that they could be passed to psample_sample_packet() when a sampled packet is trapped to the CPU. Subsequent patches are going to add more types of sampling triggers, making it difficult to maintain the current scheme. Instead, store all the active sampling triggers with their associated parameters in a hash table. That way, more trigger types can be easily added. The next patch will flip mlxsw to use the hash table instead of the current scheme. 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_trap.c')
0 files changed, 0 insertions, 0 deletions