]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5e: Fix source port matching in fdb peer flow rule
authorRaed Salem <raeds@mellanox.com>
Sun, 2 Jun 2019 09:04:08 +0000 (12:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:09:06 +0000 (08:09 +0200)
The cited commit changed the initialization placement of the eswitch
attributes so it is done prior to parse tc actions function call,
including among others the in_rep and in_mdev fields which are mistakenly
reassigned inside the parse actions function.

This breaks the source port matching criteria of the peer redirect rule.

Fix by removing the now redundant reassignment of the already initialized
fields.

Fixes: 988ab9c7363a ("net/mlx5e: Introduce mlx5e_flow_esw_attr_init() helper")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 4cb23631616b20ec57cda83848cb6d010a9a1189..a43ddfc0ff0b061abac7005b9b261e6ec597e29c 100644 (file)
@@ -2572,9 +2572,6 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
        if (!flow_action_has_entries(flow_action))
                return -EINVAL;
 
-       attr->in_rep = rpriv->rep;
-       attr->in_mdev = priv->mdev;
-
        flow_action_for_each(i, act, flow_action) {
                switch (act->id) {
                case FLOW_ACTION_DROP: