Commit ae358594 authored by Parav Pandit's avatar Parav Pandit Committed by Saeed Mahameed

net/mlx5: E-switch, Avoid extack error log for disabled vport

When E-switch vport is disabled, querying its hardware address is
unsupported.
Avoid setting extack error log message in such case.

Fixes: f099fde1 ("net/mlx5: E-switch, Support querying port function mac address")
Signed-off-by: default avatarParav Pandit <parav@nvidia.com>
Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 465e7baa
...@@ -1902,8 +1902,6 @@ int mlx5_devlink_port_function_hw_addr_get(struct devlink *devlink, ...@@ -1902,8 +1902,6 @@ int mlx5_devlink_port_function_hw_addr_get(struct devlink *devlink,
ether_addr_copy(hw_addr, vport->info.mac); ether_addr_copy(hw_addr, vport->info.mac);
*hw_addr_len = ETH_ALEN; *hw_addr_len = ETH_ALEN;
err = 0; err = 0;
} else {
NL_SET_ERR_MSG_MOD(extack, "Eswitch vport is disabled");
} }
mutex_unlock(&esw->state_lock); mutex_unlock(&esw->state_lock);
return err; return err;
......
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