]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net/mlx5e: CT, Remove redundant flow args from tc ct calls
authorRoi Dayan <roid@nvidia.com>
Sun, 19 Dec 2021 08:36:03 +0000 (10:36 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 Jan 2022 20:37:35 +0000 (12:37 -0800)
The flow arg is not being used so remove it.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 1fe6c9c786a236fd2214bf17a1fcadb570d7fe35..0f4d3b9dd979d554c16c5450faccb066f5d2db15 100644 (file)
@@ -1787,7 +1787,6 @@ mlx5_tc_ct_del_ft_cb(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_ft *ft)
  */
 static struct mlx5_flow_handle *
 __mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *ct_priv,
-                         struct mlx5e_tc_flow *flow,
                          struct mlx5_flow_spec *orig_spec,
                          struct mlx5_flow_attr *attr)
 {
@@ -1926,7 +1925,6 @@ err_ft:
 
 struct mlx5_flow_handle *
 mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
-                       struct mlx5e_tc_flow *flow,
                        struct mlx5_flow_spec *spec,
                        struct mlx5_flow_attr *attr,
                        struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts)
@@ -1937,7 +1935,7 @@ mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
                return ERR_PTR(-EOPNOTSUPP);
 
        mutex_lock(&priv->control_lock);
-       rule = __mlx5_tc_ct_flow_offload(priv, flow, spec, attr);
+       rule = __mlx5_tc_ct_flow_offload(priv, spec, attr);
        mutex_unlock(&priv->control_lock);
 
        return rule;
@@ -1945,8 +1943,8 @@ mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
 
 static void
 __mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *ct_priv,
-                        struct mlx5e_tc_flow *flow,
-                        struct mlx5_ct_flow *ct_flow)
+                        struct mlx5_ct_flow *ct_flow,
+                        struct mlx5_flow_attr *attr)
 {
        struct mlx5_flow_attr *pre_ct_attr = ct_flow->pre_ct_attr;
        struct mlx5e_priv *priv = netdev_priv(ct_priv->netdev);
@@ -1966,7 +1964,6 @@ __mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *ct_priv,
 
 void
 mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *priv,
-                      struct mlx5e_tc_flow *flow,
                       struct mlx5_flow_attr *attr)
 {
        struct mlx5_ct_flow *ct_flow = attr->ct_attr.ct_flow;
@@ -1978,7 +1975,7 @@ mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *priv,
                return;
 
        mutex_lock(&priv->control_lock);
-       __mlx5_tc_ct_delete_flow(priv, flow, ct_flow);
+       __mlx5_tc_ct_delete_flow(priv, ct_flow, attr);
        mutex_unlock(&priv->control_lock);
 }
 
index 99662af1e41a72aaad1fe9ee55516d3cb82adb3a..2b21c7b97a52ef35b70b7f3b7fc933231d1ae898 100644 (file)
@@ -116,13 +116,11 @@ mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
 
 struct mlx5_flow_handle *
 mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
-                       struct mlx5e_tc_flow *flow,
                        struct mlx5_flow_spec *spec,
                        struct mlx5_flow_attr *attr,
                        struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts);
 void
 mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *priv,
-                      struct mlx5e_tc_flow *flow,
                       struct mlx5_flow_attr *attr);
 
 bool
@@ -183,7 +181,6 @@ mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv,
 
 static inline struct mlx5_flow_handle *
 mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
-                       struct mlx5e_tc_flow *flow,
                        struct mlx5_flow_spec *spec,
                        struct mlx5_flow_attr *attr,
                        struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts)
@@ -193,7 +190,6 @@ mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *priv,
 
 static inline void
 mlx5_tc_ct_delete_flow(struct mlx5_tc_ct_priv *priv,
-                      struct mlx5e_tc_flow *flow,
                       struct mlx5_flow_attr *attr)
 {
 }
index b7d14aff5f3ab21f8810c60af3d5d7119e1cfd3c..9ffba584b982d593d114b5411a9c5c985aee5058 100644 (file)
@@ -113,13 +113,12 @@ struct mlx5e_tc_flow {
 
 struct mlx5_flow_handle *
 mlx5e_tc_rule_offload(struct mlx5e_priv *priv,
-                     struct mlx5e_tc_flow *flow,
                      struct mlx5_flow_spec *spec,
                      struct mlx5_flow_attr *attr);
 
 void
 mlx5e_tc_rule_unoffload(struct mlx5e_priv *priv,
-                       struct mlx5e_tc_flow *flow,
+                       struct mlx5_flow_handle *rule,
                        struct mlx5_flow_attr *attr);
 
 u8 mlx5e_tc_get_ip_version(struct mlx5_flow_spec *spec, bool outer);
index 83ca036528bb9abe98d28d27f23b1cb919f4dad4..1287193a019bfdfb3137ef9b95e3881392b381d3 100644 (file)
@@ -303,7 +303,6 @@ mlx5_tc_rule_delete(struct mlx5e_priv *priv,
 
 struct mlx5_flow_handle *
 mlx5e_tc_rule_offload(struct mlx5e_priv *priv,
-                     struct mlx5e_tc_flow *flow,
                      struct mlx5_flow_spec *spec,
                      struct mlx5_flow_attr *attr)
 {
@@ -313,7 +312,7 @@ mlx5e_tc_rule_offload(struct mlx5e_priv *priv,
                struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts =
                        &attr->parse_attr->mod_hdr_acts;
 
-               return mlx5_tc_ct_flow_offload(get_ct_priv(priv), flow,
+               return mlx5_tc_ct_flow_offload(get_ct_priv(priv),
                                               spec, attr,
                                               mod_hdr_acts);
        }
@@ -329,14 +328,13 @@ mlx5e_tc_rule_offload(struct mlx5e_priv *priv,
 
 void
 mlx5e_tc_rule_unoffload(struct mlx5e_priv *priv,
-                       struct mlx5e_tc_flow *flow,
+                       struct mlx5_flow_handle *rule,
                        struct mlx5_flow_attr *attr)
 {
        struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
-       struct mlx5_flow_handle *rule = flow->rule[0];
 
        if (attr->flags & MLX5_ATTR_FLAG_CT) {
-               mlx5_tc_ct_delete_flow(get_ct_priv(priv), flow, attr);
+               mlx5_tc_ct_delete_flow(get_ct_priv(priv), attr);
                return;
        }
 
@@ -1136,7 +1134,7 @@ mlx5e_tc_add_nic_flow(struct mlx5e_priv *priv,
        }
 
        if (attr->flags & MLX5_ATTR_FLAG_CT)
-               flow->rule[0] = mlx5_tc_ct_flow_offload(get_ct_priv(priv), flow, &parse_attr->spec,
+               flow->rule[0] = mlx5_tc_ct_flow_offload(get_ct_priv(priv), &parse_attr->spec,
                                                        attr, &parse_attr->mod_hdr_acts);
        else
                flow->rule[0] = mlx5e_add_offloaded_nic_rule(priv, &parse_attr->spec,
@@ -1171,7 +1169,7 @@ static void mlx5e_tc_del_nic_flow(struct mlx5e_priv *priv,
        flow_flag_clear(flow, OFFLOADED);
 
        if (attr->flags & MLX5_ATTR_FLAG_CT)
-               mlx5_tc_ct_delete_flow(get_ct_priv(flow->priv), flow, attr);
+               mlx5_tc_ct_delete_flow(get_ct_priv(flow->priv), attr);
        else if (!IS_ERR_OR_NULL(flow->rule[0]))
                mlx5e_del_offloaded_nic_rule(priv, flow->rule[0], attr);
 
@@ -1210,7 +1208,7 @@ mlx5e_tc_offload_fdb_rules(struct mlx5_eswitch *esw,
        if (attr->flags & MLX5_ATTR_FLAG_SLOW_PATH)
                return mlx5_eswitch_add_offloaded_rule(esw, spec, attr);
 
-       rule = mlx5e_tc_rule_offload(flow->priv, flow, spec, attr);
+       rule = mlx5e_tc_rule_offload(flow->priv, spec, attr);
 
        if (IS_ERR(rule))
                return rule;
@@ -1224,7 +1222,7 @@ mlx5e_tc_offload_fdb_rules(struct mlx5_eswitch *esw,
        return rule;
 
 err_rule1:
-       mlx5e_tc_rule_unoffload(flow->priv, flow, attr);
+       mlx5e_tc_rule_unoffload(flow->priv, rule, attr);
        return flow->rule[1];
 }
 
@@ -1240,7 +1238,7 @@ void mlx5e_tc_unoffload_fdb_rules(struct mlx5_eswitch *esw,
        if (attr->esw_attr->split_count)
                mlx5_eswitch_del_fwd_rule(esw, flow->rule[1], attr);
 
-       mlx5e_tc_rule_unoffload(flow->priv, flow, attr);
+       mlx5e_tc_rule_unoffload(flow->priv, flow->rule[0], attr);
 }
 
 struct mlx5_flow_handle *