Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.

Useful for debugging.

Submitted by:		Sepherosa Ziehau <sephe@dragonflybsd.org>
MFC after:		3 days
Sponsored by:		Mellanox Technologies
This commit is contained in:
hselasky 2017-08-09 10:32:51 +00:00
parent 1786668d0d
commit 884a24aa18

View File

@ -1771,7 +1771,8 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
(unsigned)dev->if_mtu, (unsigned)new_mtu);
if ((new_mtu < MLX4_EN_MIN_MTU) || (new_mtu > priv->max_mtu)) {
en_err(priv, "Bad MTU size:%d.\n", new_mtu);
en_err(priv, "Bad MTU size:%d, max %u.\n", new_mtu,
priv->max_mtu);
return -EPERM;
}
mutex_lock(&mdev->state_lock);