OSDN Git Service

net/mlx5: E-Switch, Create a dedicated send to vport rule deletion function
[uclinux-h8/linux.git] / drivers / net / ethernet / mellanox / mlx5 / core / eswitch.h
index 565c8b7..9ed4012 100644 (file)
@@ -139,10 +139,9 @@ struct mlx5_esw_sq {
 };
 
 struct mlx5_eswitch_rep {
-       int                    (*load)(struct mlx5_eswitch *esw,
+       int                    (*load)(struct mlx5_core_dev *dev,
                                       struct mlx5_eswitch_rep *rep);
-       void                   (*unload)(struct mlx5_eswitch *esw,
-                                        struct mlx5_eswitch_rep *rep);
+       void                   (*unload)(struct mlx5_eswitch_rep *rep);
        u16                    vport;
        u8                     hw_id[ETH_ALEN];
        struct net_device      *netdev;
@@ -197,6 +196,8 @@ struct mlx5_eswitch {
 
 void esw_offloads_cleanup(struct mlx5_eswitch *esw, int nvports);
 int esw_offloads_init(struct mlx5_eswitch *esw, int nvports);
+void esw_offloads_cleanup_reps(struct mlx5_eswitch *esw);
+int esw_offloads_init_reps(struct mlx5_eswitch *esw);
 
 /* E-Switch API */
 int mlx5_eswitch_init(struct mlx5_core_dev *dev);
@@ -221,6 +222,10 @@ int mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw,
 int mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw,
                                 int vport,
                                 struct ifla_vf_stats *vf_stats);
+struct mlx5_flow_handle *
+mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw, int vport,
+                                   u32 sqn);
+void mlx5_eswitch_del_send_to_vport_rule(struct mlx5_flow_handle *rule);
 
 struct mlx5_flow_spec;
 struct mlx5_esw_flow_attr;
@@ -257,12 +262,6 @@ struct mlx5_esw_flow_attr {
        struct mlx5e_tc_flow_parse_attr *parse_attr;
 };
 
-int mlx5_eswitch_sqs2vport_start(struct mlx5_eswitch *esw,
-                                struct mlx5_eswitch_rep *rep,
-                                u16 *sqns_array, int sqns_num);
-void mlx5_eswitch_sqs2vport_stop(struct mlx5_eswitch *esw,
-                                struct mlx5_eswitch_rep *rep);
-
 int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode);
 int mlx5_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode);
 int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode);