Lines Matching refs:region
149 struct mlxsw_sp_acl_tcam_region *region; member
169 struct mlxsw_sp_acl_tcam_region *region; member
210 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_group_update() local
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()
220 list_next_entry(region, list)->vregion == region->vregion) in mlxsw_sp_acl_tcam_group_update()
223 region->id, multi); in mlxsw_sp_acl_tcam_group_update()
385 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_group_region_attach() argument
413 list_add_tail(®ion->list, pos); in mlxsw_sp_acl_tcam_group_region_attach()
414 region->group = group; in mlxsw_sp_acl_tcam_group_region_attach()
425 list_del(®ion->list); in mlxsw_sp_acl_tcam_group_region_attach()
433 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_group_region_detach() argument
435 struct mlxsw_sp_acl_tcam_group *group = region->group; in mlxsw_sp_acl_tcam_group_region_detach()
438 list_del(®ion->list); in mlxsw_sp_acl_tcam_group_region_detach()
463 vregion->region, in mlxsw_sp_acl_tcam_vgroup_vregion_attach()
483 mlxsw_sp_acl_tcam_group_region_detach(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vgroup_vregion_detach()
571 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_alloc() argument
573 struct mlxsw_afk_key_info *key_info = region->key_info; in mlxsw_sp_acl_tcam_region_alloc()
580 region->key_type, in mlxsw_sp_acl_tcam_region_alloc()
582 region->id, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
593 mlxsw_reg_ptar_unpack(ptar_pl, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
599 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_free() argument
604 region->key_type, 0, region->id, in mlxsw_sp_acl_tcam_region_free()
605 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_free()
611 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_enable() argument
615 mlxsw_reg_pacl_pack(pacl_pl, region->id, true, in mlxsw_sp_acl_tcam_region_enable()
616 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_enable()
622 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_disable() argument
626 mlxsw_reg_pacl_pack(pacl_pl, region->id, false, in mlxsw_sp_acl_tcam_region_disable()
627 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_disable()
638 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_region_create() local
641 region = kzalloc(sizeof(*region) + ops->region_priv_size, GFP_KERNEL); in mlxsw_sp_acl_tcam_region_create()
642 if (!region) in mlxsw_sp_acl_tcam_region_create()
644 region->mlxsw_sp = mlxsw_sp; in mlxsw_sp_acl_tcam_region_create()
645 region->vregion = vregion; in mlxsw_sp_acl_tcam_region_create()
646 region->key_info = vregion->key_info; in mlxsw_sp_acl_tcam_region_create()
648 err = mlxsw_sp_acl_tcam_region_id_get(tcam, ®ion->id); in mlxsw_sp_acl_tcam_region_create()
652 err = ops->region_associate(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
656 region->key_type = ops->key_type; in mlxsw_sp_acl_tcam_region_create()
657 err = mlxsw_sp_acl_tcam_region_alloc(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
661 err = mlxsw_sp_acl_tcam_region_enable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
665 err = ops->region_init(mlxsw_sp, region->priv, tcam->priv, in mlxsw_sp_acl_tcam_region_create()
666 region, hints_priv); in mlxsw_sp_acl_tcam_region_create()
670 return region; in mlxsw_sp_acl_tcam_region_create()
673 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
675 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
678 mlxsw_sp_acl_tcam_region_id_put(tcam, region->id); in mlxsw_sp_acl_tcam_region_create()
680 kfree(region); in mlxsw_sp_acl_tcam_region_create()
686 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_destroy() argument
691 ops->region_fini(mlxsw_sp, region->priv); in mlxsw_sp_acl_tcam_region_destroy()
692 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
693 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
694 mlxsw_sp_acl_tcam_region_id_put(tcam, region->id); in mlxsw_sp_acl_tcam_region_destroy()
695 kfree(region); in mlxsw_sp_acl_tcam_region_destroy()
797 vregion->region = mlxsw_sp_acl_tcam_region_create(mlxsw_sp, tcam, in mlxsw_sp_acl_tcam_vregion_create()
799 if (IS_ERR(vregion->region)) { in mlxsw_sp_acl_tcam_vregion_create()
800 err = PTR_ERR(vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
822 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
851 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_destroy()
903 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_chunk_create() argument
912 chunk->region = region; in mlxsw_sp_acl_tcam_chunk_create()
914 ops->chunk_init(region->priv, chunk->priv, vchunk->priority); in mlxsw_sp_acl_tcam_chunk_create()
966 vchunk->vregion->region); in mlxsw_sp_acl_tcam_vchunk_create()
1063 err = ops->entry_add(mlxsw_sp, chunk->region->priv, chunk->priv, in mlxsw_sp_acl_tcam_entry_create()
1080 ops->entry_del(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_destroy()
1087 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_entry_action_replace() argument
1093 return ops->entry_action_replace(mlxsw_sp, region->priv, in mlxsw_sp_acl_tcam_entry_action_replace()
1104 return ops->entry_activity_get(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_activity_get()
1168 vchunk->vregion->region, in mlxsw_sp_acl_tcam_ventry_action_replace()
1213 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_start() argument
1220 new_chunk = mlxsw_sp_acl_tcam_chunk_create(mlxsw_sp, vchunk, region); in mlxsw_sp_acl_tcam_vchunk_migrate_start()
1244 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_one() argument
1251 if (vchunk->chunk->region != region) { in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1253 region, ctx); in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1343 vregion->region, in mlxsw_sp_acl_tcam_vchunk_migrate_all()
1369 swap(vregion->region, vregion->region2); in mlxsw_sp_acl_tcam_vregion_migrate()
1404 hints_priv = ops->region_rehash_hints_get(vregion->region->priv); in mlxsw_sp_acl_tcam_vregion_rehash_start()
1418 vregion->region2 = vregion->region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1419 vregion->region = new_region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1434 vregion->region = vregion->region2; in mlxsw_sp_acl_tcam_vregion_rehash_start()