Commit 237ac8de authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5e: Use netdev_warn() for errors for added prefix

This helps identify the source of the message.
If netdev still doesn't exists use mlx5_core_warn().
Signed-off-by: default avatarRoi Dayan <roid@mellanox.com>
Reviewed-by: default avatarVlad Buslov <vladbu@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent b7d0db55
...@@ -192,7 +192,8 @@ static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(vport_rep) ...@@ -192,7 +192,8 @@ static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(vport_rep)
err = mlx5_eswitch_get_vport_stats(esw, rep->vport, &vf_stats); err = mlx5_eswitch_get_vport_stats(esw, rep->vport, &vf_stats);
if (err) { if (err) {
pr_warn("vport %d error %d reading stats\n", rep->vport, err); netdev_warn(priv->netdev, "vport %d error %d reading stats\n",
rep->vport, err);
return; return;
} }
...@@ -2032,7 +2033,8 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) ...@@ -2032,7 +2033,8 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
&mlx5e_uplink_rep_profile : &mlx5e_rep_profile; &mlx5e_uplink_rep_profile : &mlx5e_rep_profile;
netdev = mlx5e_create_netdev(dev, profile, nch, rpriv); netdev = mlx5e_create_netdev(dev, profile, nch, rpriv);
if (!netdev) { if (!netdev) {
pr_warn("Failed to create representor netdev for vport %d\n", mlx5_core_warn(dev,
"Failed to create representor netdev for vport %d\n",
rep->vport); rep->vport);
kfree(rpriv); kfree(rpriv);
return -EINVAL; return -EINVAL;
...@@ -2051,28 +2053,31 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) ...@@ -2051,28 +2053,31 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
err = mlx5e_attach_netdev(netdev_priv(netdev)); err = mlx5e_attach_netdev(netdev_priv(netdev));
if (err) { if (err) {
pr_warn("Failed to attach representor netdev for vport %d\n", netdev_warn(netdev,
"Failed to attach representor netdev for vport %d\n",
rep->vport); rep->vport);
goto err_destroy_mdev_resources; goto err_destroy_mdev_resources;
} }
err = mlx5e_rep_neigh_init(rpriv); err = mlx5e_rep_neigh_init(rpriv);
if (err) { if (err) {
pr_warn("Failed to initialized neighbours handling for vport %d\n", netdev_warn(netdev,
"Failed to initialized neighbours handling for vport %d\n",
rep->vport); rep->vport);
goto err_detach_netdev; goto err_detach_netdev;
} }
err = register_devlink_port(dev, rpriv); err = register_devlink_port(dev, rpriv);
if (err) { if (err) {
esw_warn(dev, "Failed to register devlink port %d\n", netdev_warn(netdev, "Failed to register devlink port %d\n",
rep->vport); rep->vport);
goto err_neigh_cleanup; goto err_neigh_cleanup;
} }
err = register_netdev(netdev); err = register_netdev(netdev);
if (err) { if (err) {
pr_warn("Failed to register representor netdev for vport %d\n", netdev_warn(netdev,
"Failed to register representor netdev for vport %d\n",
rep->vport); rep->vport);
goto err_devlink_cleanup; goto err_devlink_cleanup;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment