Merge tag 'mlx5-fixes-2019-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorDavid S. Miller <davem@davemloft.net>
Thu, 11 Jul 2019 22:06:37 +0000 (15:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jul 2019 22:06:37 +0000 (15:06 -0700)
Saeed Mahameed says:

====================
Mellanox, mlx5 fixes 2019-07-11

This series introduces some fixes to mlx5 driver.

Please pull and let me know if there is any problem.

For -stable v4.15
('net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn')

For -stable v5.1
('net/mlx5e: Fix port tunnel GRE entropy control')
('net/mlx5e: Rx, Fix checksum calculation for new hardware')
('net/mlx5e: Fix return value from timeout recover function')
('net/mlx5e: Fix error flow in tx reporter diagnose')

For -stable v5.2
('net/mlx5: E-Switch, Fix default encap mode')

Conflict note: This pull request will produce a small conflict when
merged with net-next.
In drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
Take the hunk from net and replace:
esw_offloads_steering_init(esw, vf_nvports, total_nvports);
with:
esw_offloads_steering_init(esw);
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
include/linux/mlx5/mlx5_ifc.h

@@@ -1944,13 -1880,8 +1944,8 @@@ int mlx5_eswitch_init(struct mlx5_core_
        }
  
        esw->enabled_vports = 0;
 -      esw->mode = SRIOV_NONE;
 +      esw->mode = MLX5_ESWITCH_NONE;
        esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE;
-       if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) &&
-           MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap))
-               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_BASIC;
-       else
-               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
  
        dev->priv.eswitch = esw;
        return 0;
@@@ -2131,7 -1840,13 +2131,13 @@@ int esw_offloads_init(struct mlx5_eswit
  {
        int err;
  
 -      err = esw_offloads_steering_init(esw, vf_nvports, total_nvports);
+       if (MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, reformat) &&
+           MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, decap))
+               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_BASIC;
+       else
+               esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
 +      err = esw_offloads_steering_init(esw);
        if (err)
                return err;
  
@@@ -2181,12 -1893,21 +2187,13 @@@ static int esw_offloads_stop(struct mlx
  
  void esw_offloads_cleanup(struct mlx5_eswitch *esw)
  {
 -      u16 num_vfs;
 -
 -      if (mlx5_core_is_ecpf_esw_manager(esw->dev)) {
 -              mlx5_eq_notifier_unregister(esw->dev, &esw->host_info.nb);
 -              flush_workqueue(esw->work_queue);
 -              num_vfs = esw->host_info.num_vfs;
 -      } else {
 -              num_vfs = esw->dev->priv.sriov.num_vfs;
 -      }
 -
        mlx5_rdma_disable_roce(esw->dev);
        esw_offloads_devcom_cleanup(esw);
 -      esw_offloads_unload_all_reps(esw, num_vfs);
 +      esw_offloads_unload_all_reps(esw);
 +      if (mlx5_eswitch_vport_match_metadata_enabled(esw))
 +              mlx5_eswitch_disable_passing_vport_metadata(esw);
        esw_offloads_steering_cleanup(esw);
+       esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
  }
  
  static int esw_mode_from_devlink(u16 mode, u16 *mlx5_mode)
Simple merge