All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 05/13] mlxsw: spectrum_acl: Use block variable in mlxsw_sp_acl_rule_del()
Date: Mon, 27 Apr 2020 18:13:02 +0300	[thread overview]
Message-ID: <20200427151310.3950411-6-idosch@idosch.org> (raw)
In-Reply-To: <20200427151310.3950411-1-idosch@idosch.org>

From: Jiri Pirko <jiri@mellanox.com>

On couple of places in mlxsw_sp_acl_rule_del(), block variable is not
used directly as it could be. So do it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
index 800eaa6be3c0..c61f78e30397 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
@@ -704,14 +704,13 @@ void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp,
 
 	block->egress_blocker_rule_count -= rule->rulei->egress_bind_blocker;
 	block->ingress_blocker_rule_count -= rule->rulei->ingress_bind_blocker;
-	ruleset->ht_key.block->rule_count--;
+	block->rule_count--;
 	mutex_lock(&mlxsw_sp->acl->rules_lock);
 	list_del(&rule->list);
 	mutex_unlock(&mlxsw_sp->acl->rules_lock);
 	if (!ruleset->ht_key.chain_index &&
 	    mlxsw_sp_acl_ruleset_is_singular(ruleset))
-		mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset,
-						  ruleset->ht_key.block);
+		mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset, block);
 	rhashtable_remove_fast(&ruleset->rule_ht, &rule->ht_node,
 			       mlxsw_sp_acl_rule_ht_params);
 	ops->rule_del(mlxsw_sp, rule->priv);
-- 
2.24.1


  parent reply	other threads:[~2020-04-27 15:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 15:12 [PATCH net-next 00/13] mlxsw: Rework matchall offloading plumbing Ido Schimmel
2020-04-27 15:12 ` [PATCH net-next 01/13] mlxsw: spectrum_acl: Move block helpers into inline header functions Ido Schimmel
2020-04-27 15:12 ` [PATCH net-next 02/13] mlxsw: spectrum: Rename acl_block to flow_block Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 03/13] mlxsw: spectrum: Push flow_block related functions into a separate file Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 04/13] mlxsw: spectrum: Push matchall bits " Ido Schimmel
2020-04-27 15:13 ` Ido Schimmel [this message]
2020-04-27 15:13 ` [PATCH net-next 06/13] mlxsw: spectrum_matchall: Pass mall_entry as arg to mlxsw_sp_mall_port_mirror_add() Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 07/13] mlxsw: spectrum_matchall: Pass mall_entry as arg to mlxsw_sp_mall_port_sample_add() Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 08/13] mlxsw: spectrum_matchall: Move ingress indication into mall_entry Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 09/13] mlxsw: spectrum_matchall: Push per-port rule add/del into separate functions Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 10/13] mlxsw: spectrum: Avoid copying sample values and use RCU pointer direcly instead Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 11/13] mlxsw: spectrum_matchall: Process matchall events from the same cb as flower Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 12/13] mlxsw: spectrum: Move flow offload binding into spectrum_flow.c Ido Schimmel
2020-04-27 15:13 ` [PATCH net-next 13/13] selftests: forwarding: tc_actions.sh: add matchall mirror test Ido Schimmel
2020-04-27 19:43 ` [PATCH net-next 00/13] mlxsw: Rework matchall offloading plumbing David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200427151310.3950411-6-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.