]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
authorFeras Daoud <ferasda@mellanox.com>
Sun, 15 Jul 2018 10:59:36 +0000 (13:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Aug 2018 14:18:19 +0000 (16:18 +0200)
commit1c83fc5eeecc322cb7e1b3c05703a3c0f88cfed6
treeb158a690ab7fffaaf2c90cae955cdac2ccc74bb9
parente4cecd1c061143d090ad39cdf06784c36bafd69d
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow

[ Upstream commit 8e1d162d8e81838119de18b4ca1e302ce906f2a6 ]

After introduction of the cited commit, mlx5e_build_nic_params
receives the netdevice mtu in order to set the sw_mtu of mlx5e_params.
For enhanced IPoIB, the netdevice mtu is not set in this stage,
therefore, the initial sw_mtu equals zero. As a result, the hw_mtu
of the receive queue will be calculated incorrectly causing traffic
issues.

To fix this issue, query for port mtu before building the nic params.

Fixes: 472a1e44b349 ("net/mlx5e: Save MTU in channels params")
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c