OSDN Git Service

net/mlx5: Lag, Move mpesw related definitions to mpesw.h
authorRoi Dayan <roid@nvidia.com>
Tue, 29 Nov 2022 09:43:16 +0000 (11:43 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 4 Feb 2023 10:07:02 +0000 (02:07 -0800)
mpesw definitions should be in mpesw.h and not lag.h.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.h

index f30ac2d..66013be 100644 (file)
@@ -50,19 +50,6 @@ struct lag_tracker {
        enum netdev_lag_hash hash_type;
 };
 
-enum mpesw_op {
-       MLX5_MPESW_OP_ENABLE,
-       MLX5_MPESW_OP_DISABLE,
-};
-
-struct mlx5_mpesw_work_st {
-       struct work_struct work;
-       struct mlx5_lag    *lag;
-       enum mpesw_op      op;
-       struct completion  comp;
-       int result;
-};
-
 /* LAG data of a ConnectX card.
  * It serves both its phys functions.
  */
@@ -124,8 +111,6 @@ int mlx5_activate_lag(struct mlx5_lag *ldev,
 int mlx5_lag_dev_get_netdev_idx(struct mlx5_lag *ldev,
                                struct net_device *ndev);
 bool mlx5_shared_fdb_supported(struct mlx5_lag *ldev);
-void mlx5_lag_del_mpesw_rule(struct mlx5_core_dev *dev);
-int mlx5_lag_add_mpesw_rule(struct mlx5_core_dev *dev);
 
 char *mlx5_get_str_port_sel_mode(enum mlx5_lag_mode mode, unsigned long flags);
 void mlx5_infer_tx_enabled(struct lag_tracker *tracker, u8 num_ports,
index f88dc6e..818f19b 100644 (file)
@@ -12,10 +12,25 @@ struct lag_mpesw {
        atomic_t mpesw_rule_count;
 };
 
+enum mpesw_op {
+       MLX5_MPESW_OP_ENABLE,
+       MLX5_MPESW_OP_DISABLE,
+};
+
+struct mlx5_mpesw_work_st {
+       struct work_struct work;
+       struct mlx5_lag    *lag;
+       enum mpesw_op      op;
+       struct completion  comp;
+       int result;
+};
+
 int mlx5_lag_mpesw_do_mirred(struct mlx5_core_dev *mdev,
                             struct net_device *out_dev,
                             struct netlink_ext_ack *extack);
 bool mlx5_lag_mpesw_is_activated(struct mlx5_core_dev *dev);
+void mlx5_lag_del_mpesw_rule(struct mlx5_core_dev *dev);
+int mlx5_lag_add_mpesw_rule(struct mlx5_core_dev *dev);
 #if IS_ENABLED(CONFIG_MLX5_ESWITCH)
 void mlx5_lag_mpesw_init(struct mlx5_lag *ldev);
 void mlx5_lag_mpesw_cleanup(struct mlx5_lag *ldev);