summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2026-09-23 13:38:20 +0300
committerJakub Kicinski <kuba@kernel.org>2026-09-28 17:17:13 -0700
commitd9f3227f673b7d5aa0bdb822a2cc6be17e10f3e0 (patch)
tree87ee3f7a2fe6b910d6b49384226432cfa71867b9 /tools/lib/python/kdoc/python_version.py
parent11dac22ca06323148a387f71aef2a9885d5efa10 (diff)
net/mlx5: LAG, allocate v2p_map dynamically
v2p_map was a fixed array sized MLX5_MAX_PORTS * MLX5_LAG_MAX_HASH_BUCKETS embedded in struct mlx5_lag. Turn it into a pointer allocated in mlx5_lag_dev_alloc() once ldev->ports is known, sized by the actual port count, and free it in mlx5_ldev_free(). The ldev->ports / ldev->buckets initialization is moved up so the allocation can use it. The matching scratch buffer in mlx5_modify_lag() is converted from a MLX5_MAX_PORTS-sized stack array to a kcalloc() of the same extent, with the trailing teardown reworked through a goto so the buffer is freed on every path. The memcpy() that previously relied on sizeof() of the stack array now uses the explicit ldev->ports * MLX5_LAG_MAX_HASH_BUCKETS span. No functional change; this removes v2p_map's dependency on MLX5_MAX_PORTS. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Akiva Goldberger <agoldberger@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260923103830.1183-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions