diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2019-01-22 13:42:10 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-04-05 14:10:35 -0700 |
commit | 6d7ee2edaa54d676026b7f0d50ae472e62a84564 (patch) | |
tree | 1d67673631775485357c3bbacccf0bf2905bc3dc /drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | |
parent | 0b77f2305f38d63fbf0c501adfd342848d695718 (diff) |
net/mlx5e: Unify logic of MTU boundaries
Expose a new helper that wraps the logic for setting the
netdevice's MTU boundaries.
Use it for the different components (Eth, rep, IPoIB).
Set the netdevice min MTU to ETH_MIN_MTU, and the max according
to both the FW capability and the kernel definition.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c index 4eac42555c7d..9b03ae1e1e10 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c @@ -77,15 +77,14 @@ int mlx5i_init(struct mlx5_core_dev *mdev, void *ppriv) { struct mlx5e_priv *priv = mlx5i_epriv(netdev); - u16 max_mtu; int err; err = mlx5e_netdev_init(netdev, priv, mdev, profile, ppriv); if (err) return err; - mlx5_query_port_max_mtu(mdev, &max_mtu, 1); - netdev->mtu = max_mtu; + mlx5e_set_netdev_mtu_boundaries(priv); + netdev->mtu = netdev->max_mtu; mlx5e_build_nic_params(mdev, &priv->rss_params, &priv->channels.params, mlx5e_get_netdev_max_channels(netdev), |