Commit a64c5edb authored by Paul Blakey's avatar Paul Blakey Committed by Saeed Mahameed

net/mlx5: Remove unnecessary checks for slow path flag

After previous changes, caller (mlx5e_tc_offload_fdb_rules()) already
checks for the slow path flag, and if set won't call offload/unoffload
sample.
Signed-off-by: default avatarPaul Blakey <paulb@nvidia.com>
Reviewed-by: default avatarMaor Dickman <maord@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 537e4d2e
...@@ -509,13 +509,6 @@ mlx5e_tc_sample_offload(struct mlx5e_tc_psample *tc_psample, ...@@ -509,13 +509,6 @@ mlx5e_tc_sample_offload(struct mlx5e_tc_psample *tc_psample,
if (IS_ERR_OR_NULL(tc_psample)) if (IS_ERR_OR_NULL(tc_psample))
return ERR_PTR(-EOPNOTSUPP); return ERR_PTR(-EOPNOTSUPP);
/* If slow path flag is set, eg. when the neigh is invalid for encap,
* don't offload sample action.
*/
esw = tc_psample->esw;
if (attr->flags & MLX5_ESW_ATTR_FLAG_SLOW_PATH)
return mlx5_eswitch_add_offloaded_rule(esw, spec, attr);
sample_flow = kzalloc(sizeof(*sample_flow), GFP_KERNEL); sample_flow = kzalloc(sizeof(*sample_flow), GFP_KERNEL);
if (!sample_flow) if (!sample_flow)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -527,6 +520,7 @@ mlx5e_tc_sample_offload(struct mlx5e_tc_psample *tc_psample, ...@@ -527,6 +520,7 @@ mlx5e_tc_sample_offload(struct mlx5e_tc_psample *tc_psample,
* Only match the fte id instead of the same match in the * Only match the fte id instead of the same match in the
* original flow table. * original flow table.
*/ */
esw = tc_psample->esw;
if (MLX5_CAP_GEN(esw->dev, reg_c_preserve) || if (MLX5_CAP_GEN(esw->dev, reg_c_preserve) ||
attr->action & MLX5_FLOW_CONTEXT_ACTION_DECAP) { attr->action & MLX5_FLOW_CONTEXT_ACTION_DECAP) {
struct mlx5_flow_table *ft; struct mlx5_flow_table *ft;
...@@ -634,15 +628,6 @@ mlx5e_tc_sample_unoffload(struct mlx5e_tc_psample *tc_psample, ...@@ -634,15 +628,6 @@ mlx5e_tc_sample_unoffload(struct mlx5e_tc_psample *tc_psample,
if (IS_ERR_OR_NULL(tc_psample)) if (IS_ERR_OR_NULL(tc_psample))
return; return;
/* If slow path flag is set, sample action is not offloaded.
* No need to delete sample rule.
*/
esw = tc_psample->esw;
if (attr->flags & MLX5_ESW_ATTR_FLAG_SLOW_PATH) {
mlx5_eswitch_del_offloaded_rule(esw, rule, attr);
return;
}
/* The following delete order can't be changed, otherwise, /* The following delete order can't be changed, otherwise,
* will hit fw syndromes. * will hit fw syndromes.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment