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

index 7281f8d6cba632bb114dcf970094cd1cebd2d2f3,e9339e7d6a1874806c0ecdcb0d31967e3cb75854..3b04d8927fb1a408cf5f34ae78f7282658ba874e
@@@ -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;
index 5f78e76019c5165af28ca275fdec7d4159b50df4,c2beadc41c4003b18d63573f8e92ac5589a19b35..957d9b09dc3fe1291aa0eb17e39d9501e30dcb97
@@@ -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