Commit 0279b545 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed
Browse files

net/mlx5: devlink, Only show PF related devlink warning when needed



Limit the PF related warning to show if device is actually a PF.

Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarMaor Dickman <maord@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 7eb197fd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -162,9 +162,8 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
		return -EOPNOTSUPP;
	}

	if (pci_num_vf(pdev)) {
	if (mlx5_core_is_pf(dev) && pci_num_vf(pdev))
		NL_SET_ERR_MSG_MOD(extack, "reload while VFs are present is unfavorable");
	}

	switch (action) {
	case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: