netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net] mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy
@ 2017-03-06 20:22 Jiri Pirko
  2017-03-09  7:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2017-03-06 20:22 UTC (permalink / raw)
  To: netdev; +Cc: davem, petrm, idosch, mlxsw, ivecera

From: Jiri Pirko <jiri@mellanox.com>

This warnings may be hit even in case they should not - in case user
puts a TC-flower rule which failed to be offloaded. So just remove them.

Reported-by: Petr Machata <petrm@mellanox.com>
Reported-by: Ido Schimmel <idosch@mellanox.com>
Fixes: commit 7aa0f5aa9030 ("mlxsw: spectrum: Implement TC flower offload")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index 22ab429..ae6cccc 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -303,11 +303,11 @@ void mlxsw_sp_flower_destroy(struct mlxsw_sp_port *mlxsw_sp_port, bool ingress,
 	ruleset = mlxsw_sp_acl_ruleset_get(mlxsw_sp, mlxsw_sp_port->dev,
 					   ingress,
 					   MLXSW_SP_ACL_PROFILE_FLOWER);
-	if (WARN_ON(IS_ERR(ruleset)))
+	if (IS_ERR(ruleset))
 		return;
 
 	rule = mlxsw_sp_acl_rule_lookup(mlxsw_sp, ruleset, f->cookie);
-	if (!WARN_ON(!rule)) {
+	if (rule) {
 		mlxsw_sp_acl_rule_del(mlxsw_sp, rule);
 		mlxsw_sp_acl_rule_destroy(mlxsw_sp, rule);
 	}
-- 
2.7.4

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

* Re: [patch net] mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy
  2017-03-06 20:22 [patch net] mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy Jiri Pirko
@ 2017-03-09  7:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-09  7:17 UTC (permalink / raw)
  To: jiri; +Cc: netdev, petrm, idosch, mlxsw, ivecera

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon,  6 Mar 2017 21:22:09 +0100

> From: Jiri Pirko <jiri@mellanox.com>
> 
> This warnings may be hit even in case they should not - in case user
> puts a TC-flower rule which failed to be offloaded. So just remove them.
> 
> Reported-by: Petr Machata <petrm@mellanox.com>
> Reported-by: Ido Schimmel <idosch@mellanox.com>
> Fixes: commit 7aa0f5aa9030 ("mlxsw: spectrum: Implement TC flower offload")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> Acked-by: Ido Schimmel <idosch@mellanox.com>

Applied.

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

end of thread, other threads:[~2017-03-09  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-06 20:22 [patch net] mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy Jiri Pirko
2017-03-09  7:17 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).