mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY}
Subsystems (3)
v2 cover mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY}
From: Ido Schimmel <[email protected]>
Petr says:
The handlers for FLOW_ACTION_VLAN_MANGLE and FLOW_ACTION_PRIORITY end by returning whatever the lower-level function that they call returns. If there are more actions lined up after one of these actions, those are never offloaded. Each of the two patches fixes one of those actions.
v2:
* Patch #1: Use valid SHA1 ID in Fixes line (Dave)
Petr Machata (2):
mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY
mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
.../ethernet/mellanox/mlxsw/spectrum_flower.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
Signature · 1 line
2.24.1
PATCH v2 1/2 mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY
From: Petr Machata <[email protected]>
The handler for FLOW_ACTION_PRIORITY 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.
--- drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +6 -3
@@ -155,9 +155,12 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp, proto, prio, extack); }case FLOW_ACTION_PRIORITY : -return mlxsw_sp_acl_rulei_act_priority (mlxsw_sp, rulei, - act->priority, - extack); + err =mlxsw_sp_acl_rulei_act_priority (mlxsw_sp, rulei, + act->priority, + extack); +if (err) +return err; +break ;case FLOW_ACTION_MANGLE : {enum flow_action_mangle_base htype = act->mangle.htype;__be32 be_mask = (__force __be32 ) act->mangle.mask;
Signature · 1 line
2.24.1
PATCH v2 2/2 mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
In reply to Ido SchimmelFrom: Petr Machata <[email protected]>
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.
--- drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +6 -3
@@ -150,9 +150,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 ; }case FLOW_ACTION_PRIORITY : err = mlxsw_sp_acl_rulei_act_priority(mlxsw_sp, rulei,
Signature · 1 line
2.24.1
David Miller
maintainerFrom: Ido Schimmel <[email protected]>
Date: Sun, 5 Apr 2020 09:50:20 +0300
Quoted 11 lines
From: Ido Schimmel <[email protected]>
Petr says:
The handlers for
FLOW_ACTION_VLAN_MANGLEandFLOW_ACTION_PRIORITYend by returning whatever the lower-level function that they call returns. If there are more actions lined up after one of these actions, those are never offloaded. Each of the two patches fixes one of those actions.v2:
* Patch #1: Use valid SHA1 ID in Fixes line (Dave)
Series applied and patch #2 queued up for -stable, thanks.