Lines Matching refs:region

145 	struct mlxsw_sp_acl_tcam_region *region;  member
165 struct mlxsw_sp_acl_tcam_region *region; member
206 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_group_update() local
211 list_for_each_entry(region, &group->region_list, list) { in mlxsw_sp_acl_tcam_group_update()
215 if (region->list.next != &group->region_list && in mlxsw_sp_acl_tcam_group_update()
216 list_next_entry(region, list)->vregion == region->vregion) in mlxsw_sp_acl_tcam_group_update()
219 region->id, multi); in mlxsw_sp_acl_tcam_group_update()
381 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_group_region_attach() argument
409 list_add_tail(&region->list, pos); in mlxsw_sp_acl_tcam_group_region_attach()
410 region->group = group; in mlxsw_sp_acl_tcam_group_region_attach()
421 list_del(&region->list); in mlxsw_sp_acl_tcam_group_region_attach()
429 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_group_region_detach() argument
431 struct mlxsw_sp_acl_tcam_group *group = region->group; in mlxsw_sp_acl_tcam_group_region_detach()
434 list_del(&region->list); in mlxsw_sp_acl_tcam_group_region_detach()
459 vregion->region, in mlxsw_sp_acl_tcam_vgroup_vregion_attach()
479 mlxsw_sp_acl_tcam_group_region_detach(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vgroup_vregion_detach()
567 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_alloc() argument
569 struct mlxsw_afk_key_info *key_info = region->key_info; in mlxsw_sp_acl_tcam_region_alloc()
576 region->key_type, in mlxsw_sp_acl_tcam_region_alloc()
578 region->id, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
589 mlxsw_reg_ptar_unpack(ptar_pl, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
595 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_free() argument
600 region->key_type, 0, region->id, in mlxsw_sp_acl_tcam_region_free()
601 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_free()
607 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_enable() argument
611 mlxsw_reg_pacl_pack(pacl_pl, region->id, true, in mlxsw_sp_acl_tcam_region_enable()
612 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_enable()
618 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_disable() argument
622 mlxsw_reg_pacl_pack(pacl_pl, region->id, false, in mlxsw_sp_acl_tcam_region_disable()
623 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_disable()
634 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_region_create() local
637 region = kzalloc(sizeof(*region) + ops->region_priv_size, GFP_KERNEL); in mlxsw_sp_acl_tcam_region_create()
638 if (!region) in mlxsw_sp_acl_tcam_region_create()
640 region->mlxsw_sp = mlxsw_sp; in mlxsw_sp_acl_tcam_region_create()
641 region->vregion = vregion; in mlxsw_sp_acl_tcam_region_create()
642 region->key_info = vregion->key_info; in mlxsw_sp_acl_tcam_region_create()
644 err = mlxsw_sp_acl_tcam_region_id_get(tcam, &region->id); in mlxsw_sp_acl_tcam_region_create()
648 err = ops->region_associate(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
652 region->key_type = ops->key_type; in mlxsw_sp_acl_tcam_region_create()
653 err = mlxsw_sp_acl_tcam_region_alloc(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
657 err = mlxsw_sp_acl_tcam_region_enable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
661 err = ops->region_init(mlxsw_sp, region->priv, tcam->priv, in mlxsw_sp_acl_tcam_region_create()
662 region, hints_priv); in mlxsw_sp_acl_tcam_region_create()
666 return region; in mlxsw_sp_acl_tcam_region_create()
669 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
671 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
674 mlxsw_sp_acl_tcam_region_id_put(tcam, region->id); in mlxsw_sp_acl_tcam_region_create()
676 kfree(region); in mlxsw_sp_acl_tcam_region_create()
682 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_destroy() argument
686 ops->region_fini(mlxsw_sp, region->priv); in mlxsw_sp_acl_tcam_region_destroy()
687 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
688 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
689 mlxsw_sp_acl_tcam_region_id_put(region->group->tcam, in mlxsw_sp_acl_tcam_region_destroy()
690 region->id); in mlxsw_sp_acl_tcam_region_destroy()
691 kfree(region); in mlxsw_sp_acl_tcam_region_destroy()
780 vregion->region = mlxsw_sp_acl_tcam_region_create(mlxsw_sp, tcam, in mlxsw_sp_acl_tcam_vregion_create()
782 if (IS_ERR(vregion->region)) { in mlxsw_sp_acl_tcam_vregion_create()
783 err = PTR_ERR(vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
805 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
830 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_destroy()
882 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_chunk_create() argument
891 chunk->region = region; in mlxsw_sp_acl_tcam_chunk_create()
893 ops->chunk_init(region->priv, chunk->priv, vchunk->priority); in mlxsw_sp_acl_tcam_chunk_create()
945 vchunk->vregion->region); in mlxsw_sp_acl_tcam_vchunk_create()
1042 err = ops->entry_add(mlxsw_sp, chunk->region->priv, chunk->priv, in mlxsw_sp_acl_tcam_entry_create()
1059 ops->entry_del(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_destroy()
1066 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_entry_action_replace() argument
1072 return ops->entry_action_replace(mlxsw_sp, region->priv, in mlxsw_sp_acl_tcam_entry_action_replace()
1083 return ops->entry_activity_get(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_activity_get()
1147 vchunk->vregion->region, in mlxsw_sp_acl_tcam_ventry_action_replace()
1186 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_start() argument
1191 new_chunk = mlxsw_sp_acl_tcam_chunk_create(mlxsw_sp, vchunk, region); in mlxsw_sp_acl_tcam_vchunk_migrate_start()
1215 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_one() argument
1222 if (vchunk->chunk->region != region) { in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1224 region, ctx); in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1305 vregion->region, in mlxsw_sp_acl_tcam_vchunk_migrate_all()
1330 swap(vregion->region, vregion->region2); in mlxsw_sp_acl_tcam_vregion_migrate()
1366 hints_priv = ops->region_rehash_hints_get(vregion->region->priv); in mlxsw_sp_acl_tcam_vregion_rehash_start()
1380 vregion->region2 = vregion->region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1381 vregion->region = new_region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1395 vregion->region = vregion->region2; in mlxsw_sp_acl_tcam_vregion_rehash_start()