Skip to content

Commit

Permalink
net/mlx5: devlink, Only show PF related devlink warning when needed
Browse files Browse the repository at this point in the history
Limit the PF related warning to show if device is actually a PF.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Roi Dayan authored and Saeed Mahameed committed May 19, 2023
1 parent 7eb197f commit 0279b54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0279b54

Please sign in to comment.