]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
[mirror_ubuntu-hirsute-kernel.git] / drivers / net / ethernet / mellanox / mlx5 / core / ipoib / ipoib.c
index af3bb2f7a5048240d615344770f3c07ca250649b..b7c21eb21a218de91a9b053addbfb0813fa4f74b 100644 (file)
@@ -76,6 +76,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
                void *ppriv)
 {
        struct mlx5e_priv *priv  = mlx5i_epriv(netdev);
+       u16 max_mtu;
 
        /* priv init */
        priv->mdev        = mdev;
@@ -84,6 +85,9 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
        priv->ppriv       = ppriv;
        mutex_init(&priv->state_lock);
 
+       mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
+       netdev->mtu = max_mtu;
+
        mlx5e_build_nic_params(mdev, &priv->channels.params,
                               profile->max_nch(mdev), netdev->mtu);
        mlx5i_build_nic_params(mdev, &priv->channels.params);