Skip to content

Commit 95dc190

Browse files
roidayanSaeed Mahameed
authored andcommitted
net/mlx5e: Don't inherit flow flags on peer flow creation
Currently the peer flow inherits the flags from the original flow after we've set it. At this time the flags are set according to the flow state, e.g marked as going to slow path and such. Even if not getting us to real bugs now, this opens the door to get us to troubles later. Future proof the code and avoid the inheritance, use the peer flags as were set on input when we started adding the original flow. Signed-off-by: Roi Dayan <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 544fe7c commit 95dc190

File tree

1 file changed

+4
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,7 +2813,8 @@ __mlx5e_add_fdb_flow(struct mlx5e_priv *priv,
28132813
}
28142814

28152815
static int mlx5e_tc_add_fdb_peer_flow(struct tc_cls_flower_offload *f,
2816-
struct mlx5e_tc_flow *flow)
2816+
struct mlx5e_tc_flow *flow,
2817+
u16 flow_flags)
28172818
{
28182819
struct mlx5e_priv *priv = flow->priv, *peer_priv;
28192820
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch, *peer_esw;
@@ -2842,7 +2843,7 @@ static int mlx5e_tc_add_fdb_peer_flow(struct tc_cls_flower_offload *f,
28422843
in_mdev = priv->mdev;
28432844

28442845
parse_attr = flow->esw_attr->parse_attr;
2845-
peer_flow = __mlx5e_add_fdb_flow(peer_priv, f, flow->flags,
2846+
peer_flow = __mlx5e_add_fdb_flow(peer_priv, f, flow_flags,
28462847
parse_attr->filter_dev,
28472848
flow->esw_attr->in_rep, in_mdev);
28482849
if (IS_ERR(peer_flow)) {
@@ -2880,7 +2881,7 @@ mlx5e_add_fdb_flow(struct mlx5e_priv *priv,
28802881
return PTR_ERR(flow);
28812882

28822883
if (is_peer_flow_needed(flow)) {
2883-
err = mlx5e_tc_add_fdb_peer_flow(f, flow);
2884+
err = mlx5e_tc_add_fdb_peer_flow(f, flow, flow_flags);
28842885
if (err) {
28852886
mlx5e_tc_del_fdb_flow(priv, flow);
28862887
goto out;

0 commit comments

Comments
 (0)