]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5: Extend query_esw_functions output for multi-function support
authorMoshe Shemesh <moshe@nvidia.com>
Tue, 28 Apr 2026 05:38:51 +0000 (08:38 +0300)
committerLeon Romanovsky <leon@kernel.org>
Wed, 29 Apr 2026 20:28:30 +0000 (16:28 -0400)
commit02c54621e81ccdc1907e2d735bcda751f2caade1
treec1fb611510d52007964ce6e647e23c72f5249a27
parente2337517e127b7064d1cb1d49fc2d1e0e134690c
net/mlx5: Extend query_esw_functions output for multi-function support

Update the query_esw_functions command to support a new response layout
that can report data for multiple network functions. Setting bit 14 of
the op_mod field selects the v1 layout with network_function_params
entries instead of the legacy host_params_context.

The query_host_net_function_v1 read-only capability indicates firmware
support for layout version 1, and query_host_net_function_num_max
advertises the maximum number of network function entries.

Define a new network_function_params layout and a net_function_params
union that groups host_params_context and network_function_params.
Rework the query_esw_functions output to use a flexible array of this
union, and adjust existing driver callers to use it.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260428053851.220089-5-tariqt@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/sf/mlx5_ifc_vhca_event.h
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/mlx5_ifc.h