Searched hist:"1 b9fc42e" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum.h | 1b9fc42e Tue Mar 16 10:02:57 CDT 2021 Ido Schimmel <idosch@nvidia.com> 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>
|
H A D | spectrum.c | 1b9fc42e Tue Mar 16 10:02:57 CDT 2021 Ido Schimmel <idosch@nvidia.com> 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>
|