| From 7c070332bf9b811f15e6729acc4382dc961a001f Mon Sep 17 00:00:00 2001 |
| From: Petr Machata <petrm@mellanox.com> |
| Date: Sun, 5 Apr 2020 09:50:22 +0300 |
| Subject: [PATCH] mlxsw: spectrum_flower: Do not stop at |
| FLOW_ACTION_VLAN_MANGLE |
| |
| commit ccfc569347f870830e7c7cf854679a06cf9c45b5 upstream. |
| |
| 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: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c |
| index ca31c26e98c1..9eae5d593de1 100644 |
| --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c |
| +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c |
| @@ -113,9 +113,12 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp, |
| u8 prio = act->vlan.prio; |
| u16 vid = act->vlan.vid; |
| |
| - return mlxsw_sp_acl_rulei_act_vlan(mlxsw_sp, rulei, |
| - act->id, vid, |
| - proto, prio, extack); |
| + err = mlxsw_sp_acl_rulei_act_vlan(mlxsw_sp, rulei, |
| + act->id, vid, |
| + proto, prio, extack); |
| + if (err) |
| + return err; |
| + break; |
| } |
| default: |
| NL_SET_ERR_MSG_MOD(extack, "Unsupported action"); |
| -- |
| 2.7.4 |
| |