Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50a9eea6 authored by Doron Tsur's avatar Doron Tsur Committed by David S. Miller
Browse files

net/mlx5e: Max mtu comparison fix



On change mtu the driver compares between hardware queried mtu and
software requested mtu. We need to compare between software
representation of the queried mtu and the requested mtu.

Fixes: facc9699 ('net/mlx5e: Fix HW MTU settings')
Signed-off-by: default avatarDoron Tsur <doront@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66189961
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1901,6 +1901,8 @@ static int mlx5e_change_mtu(struct net_device *netdev, int new_mtu)

	mlx5_query_port_max_mtu(mdev, &max_mtu, 1);

	max_mtu = MLX5E_HW2SW_MTU(max_mtu);

	if (new_mtu > max_mtu) {
		netdev_err(netdev,
			   "%s: Bad MTU (%d) > (%d) Max\n",