Merge tag 'mlx5-shared-2017-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 17:42:09 +0000 (10:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 17:42:09 +0000 (10:42 -0700)
Saeed Mahameed says:

====================
mlx5-shared-2017-08-07

This series includes some mlx5 updates for both net-next and rdma trees.

From Saeed,
Core driver updates to allow selectively building the driver with
or without some large driver components, such as
- E-Switch (Ethernet SRIOV support).
- Multi-Physical Function Switch (MPFs) support.
For that we split E-Switch and MPFs functionalities into separate files.

From Erez,
Delay mlx5_core events when mlx5 interfaces, namely mlx5_ib, registration
is taking place and until it completes.

From Rabie,
Increase the maximum supported flow counters.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
MAINTAINERS
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h

diff --cc MAINTAINERS
Simple merge
        return err;
  }
  
 -static int mlx5e_ndo_setup_tc(struct net_device *dev, u32 handle,
 -                            u32 chain_index, __be16 proto,
 -                            struct tc_to_netdev *tc)
 -{
+ #ifdef CONFIG_MLX5_ESWITCH
 +static int mlx5e_setup_tc_cls_flower(struct net_device *dev,
 +                                   struct tc_cls_flower_offload *cls_flower)
 +{
        struct mlx5e_priv *priv = netdev_priv(dev);
  
 -      if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS))
 -              goto mqprio;
 -
 -      if (chain_index)
 +      if (TC_H_MAJ(cls_flower->common.handle) != TC_H_MAJ(TC_H_INGRESS) ||
 +          cls_flower->common.chain_index)
                return -EOPNOTSUPP;
  
 -      switch (tc->type) {
 -      case TC_SETUP_CLSFLOWER:
 -              switch (tc->cls_flower->command) {
 -              case TC_CLSFLOWER_REPLACE:
 -                      return mlx5e_configure_flower(priv, proto, tc->cls_flower);
 -              case TC_CLSFLOWER_DESTROY:
 -                      return mlx5e_delete_flower(priv, tc->cls_flower);
 -              case TC_CLSFLOWER_STATS:
 -                      return mlx5e_stats_flower(priv, tc->cls_flower);
 -              }
 +      switch (cls_flower->command) {
 +      case TC_CLSFLOWER_REPLACE:
 +              return mlx5e_configure_flower(priv, cls_flower);
 +      case TC_CLSFLOWER_DESTROY:
 +              return mlx5e_delete_flower(priv, cls_flower);
 +      case TC_CLSFLOWER_STATS:
 +              return mlx5e_stats_flower(priv, cls_flower);
        default:
                return -EOPNOTSUPP;
        }
 -
 -mqprio:
 +}
+ #endif
 -      if (tc->type != TC_SETUP_MQPRIO)
 -              return -EINVAL;
  
 -      tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
 -
 -      return mlx5e_setup_tc(dev, tc->mqprio->num_tc);
 +static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type,
 +                        void *type_data)
 +{
 +      switch (type) {
++#ifdef CONFIG_MLX5_ESWITCH
 +      case TC_SETUP_CLSFLOWER:
 +              return mlx5e_setup_tc_cls_flower(dev, type_data);
++#endif
 +      case TC_SETUP_MQPRIO:
 +              return mlx5e_setup_tc_mqprio(dev, type_data);
 +      default:
 +              return -EOPNOTSUPP;
 +      }
  }
  
  static void
  #ifndef __MLX5_EN_TC_H__
  #define __MLX5_EN_TC_H__
  
 +#include <net/pkt_cls.h>
 +
  #define MLX5E_TC_FLOW_ID_MASK 0x0000ffff
  
+ #ifdef CONFIG_MLX5_ESWITCH
  int mlx5e_tc_init(struct mlx5e_priv *priv);
  void mlx5e_tc_cleanup(struct mlx5e_priv *priv);