Commit e39eb599 authored by David S. Miller's avatar David S. Miller

Merge tag 'mlx5-fixes-2018-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
Mellanox, mlx5 fixes 2018-07-31

The following series includes four mlx5 fixes.

Please pull and let me know if there's any problem.

For -stable v4.14
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager

For -stable v4.16
net/mlx5e: Set port trust mode to PCP as default

For -stable v4.17
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6751e7c6 8e1d162d
...@@ -1172,6 +1172,8 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv) ...@@ -1172,6 +1172,8 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv)
struct mlx5_core_dev *mdev = priv->mdev; struct mlx5_core_dev *mdev = priv->mdev;
int err; int err;
priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_PCP;
if (!MLX5_DSCP_SUPPORTED(mdev)) if (!MLX5_DSCP_SUPPORTED(mdev))
return 0; return 0;
......
...@@ -3712,7 +3712,8 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu, ...@@ -3712,7 +3712,8 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu,
if (!reset) { if (!reset) {
params->sw_mtu = new_mtu; params->sw_mtu = new_mtu;
set_mtu_cb(priv); if (set_mtu_cb)
set_mtu_cb(priv);
netdev->mtu = params->sw_mtu; netdev->mtu = params->sw_mtu;
goto out; goto out;
} }
......
...@@ -1696,7 +1696,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev) ...@@ -1696,7 +1696,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
int vport_num; int vport_num;
int err; int err;
if (!MLX5_VPORT_MANAGER(dev)) if (!MLX5_ESWITCH_MANAGER(dev))
return 0; return 0;
esw_info(dev, esw_info(dev,
...@@ -1765,7 +1765,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev) ...@@ -1765,7 +1765,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
{ {
if (!esw || !MLX5_VPORT_MANAGER(esw->dev)) if (!esw || !MLX5_ESWITCH_MANAGER(esw->dev))
return; return;
esw_info(esw->dev, "cleanup\n"); esw_info(esw->dev, "cleanup\n");
......
...@@ -76,6 +76,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev, ...@@ -76,6 +76,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
void *ppriv) void *ppriv)
{ {
struct mlx5e_priv *priv = mlx5i_epriv(netdev); struct mlx5e_priv *priv = mlx5i_epriv(netdev);
u16 max_mtu;
/* priv init */ /* priv init */
priv->mdev = mdev; priv->mdev = mdev;
...@@ -84,6 +85,9 @@ void mlx5i_init(struct mlx5_core_dev *mdev, ...@@ -84,6 +85,9 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
priv->ppriv = ppriv; priv->ppriv = ppriv;
mutex_init(&priv->state_lock); 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, mlx5e_build_nic_params(mdev, &priv->channels.params,
profile->max_nch(mdev), netdev->mtu); profile->max_nch(mdev), netdev->mtu);
mlx5i_build_nic_params(mdev, &priv->channels.params); mlx5i_build_nic_params(mdev, &priv->channels.params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment