Lines Matching refs:region
205 struct mlxsw_sp_acl_tcam_region *region; member
225 struct mlxsw_sp_acl_tcam_region *region; member
266 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_group_update() local
271 list_for_each_entry(region, &group->region_list, list) { in mlxsw_sp_acl_tcam_group_update()
275 if (region->list.next != &group->region_list && in mlxsw_sp_acl_tcam_group_update()
276 list_next_entry(region, list)->vregion == region->vregion) in mlxsw_sp_acl_tcam_group_update()
279 region->id, multi); in mlxsw_sp_acl_tcam_group_update()
441 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_group_region_attach() argument
469 list_add_tail(®ion->list, pos); in mlxsw_sp_acl_tcam_group_region_attach()
470 region->group = group; in mlxsw_sp_acl_tcam_group_region_attach()
481 list_del(®ion->list); in mlxsw_sp_acl_tcam_group_region_attach()
489 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_group_region_detach() argument
491 struct mlxsw_sp_acl_tcam_group *group = region->group; in mlxsw_sp_acl_tcam_group_region_detach()
494 list_del(®ion->list); in mlxsw_sp_acl_tcam_group_region_detach()
519 vregion->region, in mlxsw_sp_acl_tcam_vgroup_vregion_attach()
539 mlxsw_sp_acl_tcam_group_region_detach(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vgroup_vregion_detach()
627 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_alloc() argument
629 struct mlxsw_afk_key_info *key_info = region->key_info; in mlxsw_sp_acl_tcam_region_alloc()
636 region->key_type, in mlxsw_sp_acl_tcam_region_alloc()
638 region->id, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
649 mlxsw_reg_ptar_unpack(ptar_pl, region->tcam_region_info); in mlxsw_sp_acl_tcam_region_alloc()
655 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_free() argument
660 region->key_type, 0, region->id, in mlxsw_sp_acl_tcam_region_free()
661 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_free()
667 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_enable() argument
671 mlxsw_reg_pacl_pack(pacl_pl, region->id, true, in mlxsw_sp_acl_tcam_region_enable()
672 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_enable()
678 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_disable() argument
682 mlxsw_reg_pacl_pack(pacl_pl, region->id, false, in mlxsw_sp_acl_tcam_region_disable()
683 region->tcam_region_info); in mlxsw_sp_acl_tcam_region_disable()
694 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_region_create() local
697 region = kzalloc(sizeof(*region) + ops->region_priv_size, GFP_KERNEL); in mlxsw_sp_acl_tcam_region_create()
698 if (!region) in mlxsw_sp_acl_tcam_region_create()
700 region->mlxsw_sp = mlxsw_sp; in mlxsw_sp_acl_tcam_region_create()
701 region->vregion = vregion; in mlxsw_sp_acl_tcam_region_create()
702 region->key_info = vregion->key_info; in mlxsw_sp_acl_tcam_region_create()
704 err = mlxsw_sp_acl_tcam_region_id_get(tcam, ®ion->id); in mlxsw_sp_acl_tcam_region_create()
708 err = ops->region_associate(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
712 region->key_type = ops->key_type; in mlxsw_sp_acl_tcam_region_create()
713 err = mlxsw_sp_acl_tcam_region_alloc(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
717 err = mlxsw_sp_acl_tcam_region_enable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
721 err = ops->region_init(mlxsw_sp, region->priv, tcam->priv, in mlxsw_sp_acl_tcam_region_create()
722 region, hints_priv); in mlxsw_sp_acl_tcam_region_create()
726 return region; in mlxsw_sp_acl_tcam_region_create()
729 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
731 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_create()
734 mlxsw_sp_acl_tcam_region_id_put(tcam, region->id); in mlxsw_sp_acl_tcam_region_create()
736 kfree(region); in mlxsw_sp_acl_tcam_region_create()
742 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_region_destroy() argument
746 ops->region_fini(mlxsw_sp, region->priv); in mlxsw_sp_acl_tcam_region_destroy()
747 mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
748 mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region); in mlxsw_sp_acl_tcam_region_destroy()
749 mlxsw_sp_acl_tcam_region_id_put(region->group->tcam, in mlxsw_sp_acl_tcam_region_destroy()
750 region->id); in mlxsw_sp_acl_tcam_region_destroy()
751 kfree(region); in mlxsw_sp_acl_tcam_region_destroy()
840 vregion->region = mlxsw_sp_acl_tcam_region_create(mlxsw_sp, tcam, in mlxsw_sp_acl_tcam_vregion_create()
842 if (IS_ERR(vregion->region)) { in mlxsw_sp_acl_tcam_vregion_create()
843 err = PTR_ERR(vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
865 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_create()
890 mlxsw_sp_acl_tcam_region_destroy(mlxsw_sp, vregion->region); in mlxsw_sp_acl_tcam_vregion_destroy()
977 struct mlxsw_sp_acl_tcam_region *region) in mlxsw_sp_acl_tcam_chunk_create() argument
986 chunk->region = region; in mlxsw_sp_acl_tcam_chunk_create()
988 ops->chunk_init(region->priv, chunk->priv, vchunk->priority); in mlxsw_sp_acl_tcam_chunk_create()
1040 vchunk->vregion->region); in mlxsw_sp_acl_tcam_vchunk_create()
1137 err = ops->entry_add(mlxsw_sp, chunk->region->priv, chunk->priv, in mlxsw_sp_acl_tcam_entry_create()
1154 ops->entry_del(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_destroy()
1161 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_entry_action_replace() argument
1167 return ops->entry_action_replace(mlxsw_sp, region->priv, in mlxsw_sp_acl_tcam_entry_action_replace()
1178 return ops->entry_activity_get(mlxsw_sp, entry->chunk->region->priv, in mlxsw_sp_acl_tcam_entry_activity_get()
1242 vchunk->vregion->region, in mlxsw_sp_acl_tcam_ventry_action_replace()
1281 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_start() argument
1286 new_chunk = mlxsw_sp_acl_tcam_chunk_create(mlxsw_sp, vchunk, region); in mlxsw_sp_acl_tcam_vchunk_migrate_start()
1310 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_vchunk_migrate_one() argument
1317 if (vchunk->chunk->region != region) { in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1319 region, ctx); in mlxsw_sp_acl_tcam_vchunk_migrate_one()
1400 vregion->region, in mlxsw_sp_acl_tcam_vchunk_migrate_all()
1425 swap(vregion->region, vregion->region2); in mlxsw_sp_acl_tcam_vregion_migrate()
1461 hints_priv = ops->region_rehash_hints_get(vregion->region->priv); in mlxsw_sp_acl_tcam_vregion_rehash_start()
1475 vregion->region2 = vregion->region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1476 vregion->region = new_region; in mlxsw_sp_acl_tcam_vregion_rehash_start()
1490 vregion->region = vregion->region2; in mlxsw_sp_acl_tcam_vregion_rehash_start()