mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net/mlx5: E-switch, disable host functions for a non PF e-switch manager
mlx5_esw_host_functions_enabled() only treated host functions as disabled for an ECPF manager. To support a non PF acting as an e-switch manager, add a check for a non PF e-switch manager that treats host functions as disabled. This will avoid allocating a host-PF vport in mlx5_esw_vports_init(). With host functions disabled for non PF, its e-switch is the expected manager + uplink only. 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-14-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
dd655b1e93
commit
a5bfbdfebd
|
|
@ -1241,6 +1241,11 @@ static int mlx5_esw_host_functions_enabled_query(struct mlx5_eswitch *esw)
|
|||
struct mlx5_esw_pf_info host_pf_info;
|
||||
const u32 *query_host_out;
|
||||
|
||||
if (!mlx5_core_is_pf(esw->dev)) {
|
||||
esw->esw_funcs.host_funcs_disabled = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mlx5_core_is_ecpf_esw_manager(esw->dev))
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user