Skip to content

Commit 5c661f1

Browse files
jpirkodavem330
authored andcommitted
mlxsw: reg: Add multi field to PAGT register
For Spectrum-2 this allows parallel lookups in multiple regions. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a339bf8 commit 5c661f1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,14 @@ MLXSW_ITEM32(reg, pagt, size, 0x00, 0, 8);
21992199
*/
22002200
MLXSW_ITEM32(reg, pagt, acl_group_id, 0x08, 0, 16);
22012201

2202+
/* reg_pagt_multi
2203+
* Multi-ACL
2204+
* 0 - This ACL is the last ACL in the multi-ACL
2205+
* 1 - This ACL is part of a multi-ACL
2206+
* Access: RW
2207+
*/
2208+
MLXSW_ITEM32_INDEXED(reg, pagt, multi, 0x30, 31, 1, 0x04, 0x00, false);
2209+
22022210
/* reg_pagt_acl_id
22032211
* ACL identifier
22042212
* Access: RW
@@ -2212,12 +2220,13 @@ static inline void mlxsw_reg_pagt_pack(char *payload, u16 acl_group_id)
22122220
}
22132221

22142222
static inline void mlxsw_reg_pagt_acl_id_pack(char *payload, int index,
2215-
u16 acl_id)
2223+
u16 acl_id, bool multi)
22162224
{
22172225
u8 size = mlxsw_reg_pagt_size_get(payload);
22182226

22192227
if (index >= size)
22202228
mlxsw_reg_pagt_size_set(payload, index + 1);
2229+
mlxsw_reg_pagt_multi_set(payload, index, multi);
22212230
mlxsw_reg_pagt_acl_id_set(payload, index, acl_id);
22222231
}
22232232

drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int mlxsw_sp_acl_tcam_group_update(struct mlxsw_sp *mlxsw_sp,
217217
mlxsw_reg_pagt_pack(pagt_pl, group->id);
218218
list_for_each_entry(vregion, &group->vregion_list, list)
219219
mlxsw_reg_pagt_acl_id_pack(pagt_pl, acl_index++,
220-
vregion->region->id);
220+
vregion->region->id, false);
221221
mlxsw_reg_pagt_size_set(pagt_pl, acl_index);
222222
return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pagt), pagt_pl);
223223
}

0 commit comments

Comments
 (0)