};
struct mlxsw_sp2_acl_tcam_region {
- struct mlxsw_sp_acl_ctcam_region cregion;
+ struct mlxsw_sp_acl_atcam_region aregion;
struct mlxsw_sp_acl_tcam_region *region;
};
struct mlxsw_sp_acl_tcam_region *_region)
{
struct mlxsw_sp2_acl_tcam_region *region = region_priv;
- int err;
region->region = _region;
- err = mlxsw_sp_acl_atcam_region_init(mlxsw_sp, _region);
- if (err)
- return err;
- return mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, ®ion->cregion,
+ return mlxsw_sp_acl_atcam_region_init(mlxsw_sp, ®ion->aregion,
_region);
}
{
struct mlxsw_sp2_acl_tcam_region *region = region_priv;
- mlxsw_sp_acl_ctcam_region_fini(®ion->cregion);
+ mlxsw_sp_acl_atcam_region_fini(®ion->aregion);
}
static int
struct mlxsw_sp2_acl_tcam_region *region = region_priv;
struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv;
- mlxsw_sp_acl_ctcam_chunk_init(®ion->cregion, &chunk->cchunk,
+ mlxsw_sp_acl_ctcam_chunk_init(®ion->aregion.cregion, &chunk->cchunk,
priority);
}
struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv;
entry->act_block = rulei->act_block;
- return mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->cregion,
+ return mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->aregion.cregion,
&chunk->cchunk, &entry->centry,
rulei, true);
}
struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv;
struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv;
- mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, ®ion->cregion,
+ mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, ®ion->aregion.cregion,
&chunk->cchunk, &entry->centry);
}
}
int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp,
+ struct mlxsw_sp_acl_atcam_region *aregion,
struct mlxsw_sp_acl_tcam_region *region)
{
int err;
err = mlxsw_sp_acl_atcam_region_erp_init(mlxsw_sp, region->id);
if (err)
return err;
+ return mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, &aregion->cregion,
+ region);
+}
- return 0;
+void mlxsw_sp_acl_atcam_region_fini(struct mlxsw_sp_acl_atcam_region *aregion)
+{
+ mlxsw_sp_acl_ctcam_region_fini(&aregion->cregion);
}
int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp,
};
struct mlxsw_sp_acl_atcam_region {
+ struct mlxsw_sp_acl_ctcam_region cregion;
struct mlxsw_sp_acl_tcam_region *region;
struct mlxsw_sp_acl_atcam *atcam;
enum mlxsw_sp_acl_atcam_region_type type;
int mlxsw_sp_acl_atcam_region_associate(struct mlxsw_sp *mlxsw_sp,
u16 region_id);
int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp,
+ struct mlxsw_sp_acl_atcam_region *aregion,
struct mlxsw_sp_acl_tcam_region *region);
+void mlxsw_sp_acl_atcam_region_fini(struct mlxsw_sp_acl_atcam_region *aregion);
int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_atcam *atcam);
void mlxsw_sp_acl_atcam_fini(struct mlxsw_sp *mlxsw_sp,