aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorAmit Cohen <[email protected]>2024-01-26 19:58:30 +0100
committerPaolo Abeni <[email protected]>2024-01-30 15:47:36 +0100
commitbe2f16a994f09b7f95db57f106520dd5e2585050 (patch)
tree741b40c1c728bd9f2c53090d4607c3efb733adf9 /tools/perf/scripts/python/export-to-sqlite.py
parent8d8d33d4e38b5c60cdb3dcd6f190fcf91e306dd0 (diff)
mlxsw: spectrum: Refactor LAG create and destroy code
mlxsw_sp stores an array of LAGs. When a port joins a LAG, in case that this LAG is already in use, we only have to increase the reference counter. Otherwise, we have to search for an unused LAG ID and configure it in hardware. When a port leaves a LAG, we have to destroy it only for the last user. This code can be simplified, for such requirements we usually add get() and put() functions which create and destroy the object. Add mlxsw_sp_lag_{get,put}() and use them. These functions take care of the reference counter and hardware configuration if needed. Change the reference counter to refcount_t type which catches overflow and underflow issues. Signed-off-by: Amit Cohen <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions