]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
authorPetr Machata <petrm@mellanox.com>
Sun, 5 Apr 2020 06:50:22 +0000 (09:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:45:09 +0000 (10:45 +0200)
[ Upstream commit ccfc569347f870830e7c7cf854679a06cf9c45b5 ]

The handler for FLOW_ACTION_VLAN_MANGLE ends by returning whatever the
lower-level function that it calls returns. If there are more actions lined
up after this action, those are never offloaded. Fix by only bailing out
when the called function returns an error.

Fixes: a150201a70da ("mlxsw: spectrum: Add support for vlan modify TC action")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c

index 8d211972c5e90fbe1a24dc32edf6f371ff018bd4..9f4eb3cde93e293df83f8e356d5a1c02c76dd946 100644 (file)
@@ -98,9 +98,11 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
                        u8 prio = tcf_vlan_push_prio(a);
                        u16 vid = tcf_vlan_push_vid(a);
 
-                       return mlxsw_sp_acl_rulei_act_vlan(mlxsw_sp, rulei,
-                                                          action, vid,
-                                                          proto, prio, extack);
+                       err = mlxsw_sp_acl_rulei_act_vlan(mlxsw_sp, rulei,
+                                                         action, vid,
+                                                         proto, prio, extack);
+                       if (err)
+                               return err;
                } else {
                        NL_SET_ERR_MSG_MOD(extack, "Unsupported action");
                        dev_err(mlxsw_sp->bus_info->dev, "Unsupported action\n");