diff options
author | 2025-04-10 22:17:31 +0300 | |
---|---|---|
committer | 2025-04-14 17:29:15 -0700 | |
commit | 36ef2575e78d1a3c699dc3f1c9dee9be742c9bdd (patch) | |
tree | 231aee098807499f4cf0cce5a8d3194d61adc75b /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | net: dsa: microchip: add ETS scheduler support for KSZ88x3 switches (diff) | |
download | wireguard-linux-36ef2575e78d1a3c699dc3f1c9dee9be742c9bdd.tar.xz wireguard-linux-36ef2575e78d1a3c699dc3f1c9dee9be742c9bdd.zip |
net/mlx5: HWS, Fix matcher action template attach
The procedure of attaching an action template to an existing matcher had
a few issues:
1. Attaching accidentally overran the `at` array in bwc_matcher, which
would result in memory corruption. This bug wasn't triggered, but it
is possible to trigger it by attaching action templates beyond the
initial buffer size of 8. Fix this by converting to a dynamically
sized buffer and reallocating if needed.
2. Similarly, the `at` array inside the native matcher was never
reallocated. Fix this the same as above.
3. The bwc layer treated any error in action template attach as a signal
that the matcher should be rehashed to account for a larger number of
action STEs. In reality, there are other unrelated errors that can
arise and they should be propagated upstack. Fix this by adding a
`need_rehash` output parameter that's orthogonal to error codes.
Fixes: 2111bb970c78 ("net/mlx5: HWS, added backward-compatible API handling")
Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://patch.msgid.link/1744312662-356571-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions