Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	Jiri Pirko <jiri@mellanox.com>, mlxsw <mlxsw@mellanox.com>,
	Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 10/14] mlxsw: reg: Add multi field to PAGT register
Date: Thu, 7 Feb 2019 11:22:53 +0000	[thread overview]
Message-ID: <20190207112211.10375-11-idosch@mellanox.com> (raw)
In-Reply-To: <20190207112211.10375-1-idosch@mellanox.com>

From: Jiri Pirko <jiri@mellanox.com>

For Spectrum-2 this allows parallel lookups in multiple regions.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/reg.h             | 11 ++++++++++-
 .../net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c   |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 5f8066ab7d40..227720ce3982 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -2199,6 +2199,14 @@ MLXSW_ITEM32(reg, pagt, size, 0x00, 0, 8);
  */
 MLXSW_ITEM32(reg, pagt, acl_group_id, 0x08, 0, 16);
 
+/* reg_pagt_multi
+ * Multi-ACL
+ * 0 - This ACL is the last ACL in the multi-ACL
+ * 1 - This ACL is part of a multi-ACL
+ * Access: RW
+ */
+MLXSW_ITEM32_INDEXED(reg, pagt, multi, 0x30, 31, 1, 0x04, 0x00, false);
+
 /* reg_pagt_acl_id
  * ACL identifier
  * Access: RW
@@ -2212,12 +2220,13 @@ static inline void mlxsw_reg_pagt_pack(char *payload, u16 acl_group_id)
 }
 
 static inline void mlxsw_reg_pagt_acl_id_pack(char *payload, int index,
-					      u16 acl_id)
+					      u16 acl_id, bool multi)
 {
 	u8 size = mlxsw_reg_pagt_size_get(payload);
 
 	if (index >= size)
 		mlxsw_reg_pagt_size_set(payload, index + 1);
+	mlxsw_reg_pagt_multi_set(payload, index, multi);
 	mlxsw_reg_pagt_acl_id_set(payload, index, acl_id);
 }
 
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
index 1077c893438b..12d202afa233 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
@@ -217,7 +217,7 @@ static int mlxsw_sp_acl_tcam_group_update(struct mlxsw_sp *mlxsw_sp,
 	mlxsw_reg_pagt_pack(pagt_pl, group->id);
 	list_for_each_entry(vregion, &group->vregion_list, list)
 		mlxsw_reg_pagt_acl_id_pack(pagt_pl, acl_index++,
-					   vregion->region->id);
+					   vregion->region->id, false);
 	mlxsw_reg_pagt_size_set(pagt_pl, acl_index);
 	return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pagt), pagt_pl);
 }
-- 
2.20.1


  parent reply	other threads:[~2019-02-07 11:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 11:22 [PATCH net-next 00/14] mlxsw: Implement periodic ERP rehash Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 01/14] devlink: publish params only after driver init is done Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 02/14] lib: objagg: implement optimization hints assembly and use hints for object creation Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 03/14] lib: objagg: fix typo in objagg_stats_put() docstring Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 04/14] lib: objagg: add root count to stats Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 05/14] mlxsw: spectrum_acl: Split region struct into region and vregion Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 06/14] mlxsw: spectrum_acl: Split chunk struct into chunk and vchunk Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 07/14] mlxsw: spectrum_acl: Split entry struct into entry and ventry Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 08/14] mlxsw: spectrum_acl: Implement basic ERP rehash hits creation Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 09/14] mlxsw: spectrum_acl: Pass hints priv all the way to ERP code Ido Schimmel
2019-02-07 11:22 ` Ido Schimmel [this message]
2019-02-07 11:22 ` [PATCH net-next 11/14] mlxsw: spectrum_acl: Implement region migration according to hints Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 12/14] mlxsw: spectrum: add "acl_region_rehash_interval" devlink param Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 13/14] mlxsw: spectrum_acl: Add couple of vregion rehash tracepoints Ido Schimmel
2019-02-07 11:22 ` [PATCH net-next 14/14] selftests: mlxsw: spectrum-2: Add simple delta rehash test Ido Schimmel
2019-02-08 23:03 ` [PATCH net-next 00/14] mlxsw: Implement periodic ERP rehash 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=20190207112211.10375-11-idosch@mellanox.com \
    --to=idosch@mellanox.com \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox