* [patch net] mlxsw: spectrum_acl_tcam: Get tcam_region_info returned by FW on PTAR
@ 2017-04-19 7:54 Jiri Pirko
2017-04-20 15:44 ` Jiri Pirko
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2017-04-19 7:54 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, leonro, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
During PTAR register access, FW processes tcam_region_info passed by
driver and also returns modified tcam_region_info back. This needs to be
stored by driver for any future calls.
Fixes: 22a677661f56 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
index 7382832..2f192f5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
@@ -497,10 +497,15 @@ mlxsw_sp_acl_tcam_region_resize(struct mlxsw_sp *mlxsw_sp,
u16 new_size)
{
char ptar_pl[MLXSW_REG_PTAR_LEN];
+ int err;
mlxsw_reg_ptar_pack(ptar_pl, MLXSW_REG_PTAR_OP_RESIZE,
new_size, region->id, region->tcam_region_info);
- return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptar), ptar_pl);
+ err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptar), ptar_pl);
+ if (err)
+ return err;
+ mlxsw_reg_ptar_unpack(ptar_pl, region->tcam_region_info);
+ return err;
}
static int
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net] mlxsw: spectrum_acl_tcam: Get tcam_region_info returned by FW on PTAR
2017-04-19 7:54 [patch net] mlxsw: spectrum_acl_tcam: Get tcam_region_info returned by FW on PTAR Jiri Pirko
@ 2017-04-20 15:44 ` Jiri Pirko
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Pirko @ 2017-04-20 15:44 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, leonro, mlxsw
Wed, Apr 19, 2017 at 09:54:30AM CEST, jiri@resnulli.us wrote:
>From: Jiri Pirko <jiri@mellanox.com>
>
>During PTAR register access, FW processes tcam_region_info passed by
>driver and also returns modified tcam_region_info back. This needs to be
>stored by driver for any future calls.
>
>Fixes: 22a677661f56 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation")
>Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
>Reviewed-by: Ido Schimmel <idosch@mellanox.com>
This is actually not needed. Please drop.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-20 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 7:54 [patch net] mlxsw: spectrum_acl_tcam: Get tcam_region_info returned by FW on PTAR Jiri Pirko
2017-04-20 15:44 ` Jiri Pirko
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.