All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY}
@ 2020-04-03 13:00 Ido Schimmel
  2020-04-03 13:00 ` [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY Ido Schimmel
  2020-04-03 13:00 ` [PATCH net 2/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE Ido Schimmel
  0 siblings, 2 replies; 5+ messages in thread
From: Ido Schimmel @ 2020-04-03 13:00 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

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.

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(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY
  2020-04-03 13:00 [PATCH net 0/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY} Ido Schimmel
@ 2020-04-03 13:00 ` Ido Schimmel
  2020-04-03 23:13   ` David Miller
  2020-04-03 13:00 ` [PATCH net 2/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE Ido Schimmel
  1 sibling, 1 reply; 5+ messages in thread
From: Ido Schimmel @ 2020-04-03 13:00 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

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.

Fixes: cc2c43406163 ("mlxsw: spectrum_flower: Offload FLOW_ACTION_PRIORITY")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index 2f76908cae73..69f77615c816 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -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;
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
  2020-04-03 13:00 [PATCH net 0/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY} Ido Schimmel
  2020-04-03 13:00 ` [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY Ido Schimmel
@ 2020-04-03 13:00 ` Ido Schimmel
  1 sibling, 0 replies; 5+ messages in thread
From: Ido Schimmel @ 2020-04-03 13:00 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

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>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index 69f77615c816..51117a5a6bbf 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -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,
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY
  2020-04-03 13:00 ` [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY Ido Schimmel
@ 2020-04-03 23:13   ` David Miller
  2020-04-04 21:56     ` Petr Machata
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2020-04-03 23:13 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, mlxsw, idosch

From: Ido Schimmel <idosch@idosch.org>
Date: Fri,  3 Apr 2020 16:00:09 +0300

> Fixes: cc2c43406163 ("mlxsw: spectrum_flower: Offload FLOW_ACTION_PRIORITY")

This is not a valid SHA1 ID.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY
  2020-04-03 23:13   ` David Miller
@ 2020-04-04 21:56     ` Petr Machata
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Machata @ 2020-04-04 21:56 UTC (permalink / raw)
  To: David Miller; +Cc: idosch, netdev, jiri, mlxsw, idosch


David Miller <davem@davemloft.net> writes:

> From: Ido Schimmel <idosch@idosch.org>
> Date: Fri,  3 Apr 2020 16:00:09 +0300
>
>> Fixes: cc2c43406163 ("mlxsw: spectrum_flower: Offload FLOW_ACTION_PRIORITY")
>
> This is not a valid SHA1 ID.

Sorry about it, I must have referred to a commit in my tree by mistake.
The correct SHA1 is 463957e3fbab. I'll respin the patchset.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-04 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 13:00 [PATCH net 0/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_{VLAN_MANGLE, PRIORITY} Ido Schimmel
2020-04-03 13:00 ` [PATCH net 1/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_PRIORITY Ido Schimmel
2020-04-03 23:13   ` David Miller
2020-04-04 21:56     ` Petr Machata
2020-04-03 13:00 ` [PATCH net 2/2] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE Ido Schimmel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.