Lines Matching refs:group

115 	struct mlxsw_sp_acl_tcam_group group;  member
208 struct mlxsw_sp_acl_tcam_group *group) in mlxsw_sp_acl_tcam_group_update() argument
214 mlxsw_reg_pagt_pack(pagt_pl, group->id); in mlxsw_sp_acl_tcam_group_update()
215 list_for_each_entry(region, &group->region_list, list) { in mlxsw_sp_acl_tcam_group_update()
219 if (region->list.next != &group->region_list && in mlxsw_sp_acl_tcam_group_update()
231 struct mlxsw_sp_acl_tcam_group *group) in mlxsw_sp_acl_tcam_group_add() argument
235 group->tcam = tcam; in mlxsw_sp_acl_tcam_group_add()
236 INIT_LIST_HEAD(&group->region_list); in mlxsw_sp_acl_tcam_group_add()
238 err = mlxsw_sp_acl_tcam_group_id_get(tcam, &group->id); in mlxsw_sp_acl_tcam_group_add()
242 mutex_init(&group->lock); in mlxsw_sp_acl_tcam_group_add()
247 static void mlxsw_sp_acl_tcam_group_del(struct mlxsw_sp_acl_tcam_group *group) in mlxsw_sp_acl_tcam_group_del() argument
249 struct mlxsw_sp_acl_tcam *tcam = group->tcam; in mlxsw_sp_acl_tcam_group_del()
251 mutex_destroy(&group->lock); in mlxsw_sp_acl_tcam_group_del()
252 mlxsw_sp_acl_tcam_group_id_put(tcam, group->id); in mlxsw_sp_acl_tcam_group_del()
253 WARN_ON(!list_empty(&group->region_list)); in mlxsw_sp_acl_tcam_group_del()
282 err = mlxsw_sp_acl_tcam_group_add(tcam, &vgroup->group); in mlxsw_sp_acl_tcam_vgroup_add()
294 mlxsw_sp_acl_tcam_group_del(&vgroup->group); in mlxsw_sp_acl_tcam_vgroup_add()
302 mlxsw_sp_acl_tcam_group_del(&vgroup->group); in mlxsw_sp_acl_tcam_vgroup_del()
308 struct mlxsw_sp_acl_tcam_group *group, in mlxsw_sp_acl_tcam_group_bind() argument
317 group->id); in mlxsw_sp_acl_tcam_group_bind()
323 struct mlxsw_sp_acl_tcam_group *group, in mlxsw_sp_acl_tcam_group_unbind() argument
332 group->id); in mlxsw_sp_acl_tcam_group_unbind()
337 mlxsw_sp_acl_tcam_group_id(struct mlxsw_sp_acl_tcam_group *group) in mlxsw_sp_acl_tcam_group_id() argument
339 return group->id; in mlxsw_sp_acl_tcam_group_id()
384 struct mlxsw_sp_acl_tcam_group *group, in mlxsw_sp_acl_tcam_group_region_attach() argument
393 mutex_lock(&group->lock); in mlxsw_sp_acl_tcam_group_region_attach()
394 if (group->region_count == group->tcam->max_group_size) { in mlxsw_sp_acl_tcam_group_region_attach()
406 list_for_each(pos, &group->region_list) { in mlxsw_sp_acl_tcam_group_region_attach()
414 region->group = group; in mlxsw_sp_acl_tcam_group_region_attach()
416 err = mlxsw_sp_acl_tcam_group_update(mlxsw_sp, group); in mlxsw_sp_acl_tcam_group_region_attach()
420 group->region_count++; in mlxsw_sp_acl_tcam_group_region_attach()
421 mutex_unlock(&group->lock); in mlxsw_sp_acl_tcam_group_region_attach()
427 mutex_unlock(&group->lock); in mlxsw_sp_acl_tcam_group_region_attach()
435 struct mlxsw_sp_acl_tcam_group *group = region->group; in mlxsw_sp_acl_tcam_group_region_detach() local
437 mutex_lock(&group->lock); in mlxsw_sp_acl_tcam_group_region_detach()
439 group->region_count--; in mlxsw_sp_acl_tcam_group_region_detach()
440 mlxsw_sp_acl_tcam_group_update(mlxsw_sp, group); in mlxsw_sp_acl_tcam_group_region_detach()
441 mutex_unlock(&group->lock); in mlxsw_sp_acl_tcam_group_region_detach()
462 err = mlxsw_sp_acl_tcam_group_region_attach(mlxsw_sp, &vgroup->group, in mlxsw_sp_acl_tcam_vgroup_vregion_attach()
777 struct mlxsw_sp_acl_tcam *tcam = vgroup->group.tcam; in mlxsw_sp_acl_tcam_vregion_create()
1421 vregion->region2->group, in mlxsw_sp_acl_tcam_vregion_rehash_start()
1720 return mlxsw_sp_acl_tcam_group_bind(mlxsw_sp, &ruleset->vgroup.group, in mlxsw_sp_acl_tcam_flower_ruleset_bind()
1732 mlxsw_sp_acl_tcam_group_unbind(mlxsw_sp, &ruleset->vgroup.group, in mlxsw_sp_acl_tcam_flower_ruleset_unbind()
1741 return mlxsw_sp_acl_tcam_group_id(&ruleset->vgroup.group); in mlxsw_sp_acl_tcam_flower_ruleset_group_id()
1876 return mlxsw_sp_acl_tcam_group_id(&ruleset->vgroup.group); in mlxsw_sp_acl_tcam_mr_ruleset_group_id()