TF_TBL_TYPE_ACT_MODIFY_32B,
/** TH 64B Modify Record */
TF_TBL_TYPE_ACT_MODIFY_64B,
- /** (Future) Meter Profiles */
+ /** Meter Profiles */
TF_TBL_TYPE_METER_PROF,
- /** (Future) Meter Instance */
+ /** Meter Instance */
TF_TBL_TYPE_METER_INST,
/** Wh+/SR/Th Mirror Config */
TF_TBL_TYPE_MIRROR_CONFIG,
TF_TBL_TYPE_EM_FKB,
/** TH WC Flexible Key builder */
TF_TBL_TYPE_WC_FKB,
+ /** Meter Drop Counter */
+ TF_TBL_TYPE_METER_DROP_CNT,
/* External */
TF_TUNNEL_ENCAP, /**< Tunnel Encap Config(TECT) */
TF_ACTION_BLOCK, /**< Action Block Config(ABCR) */
TF_COUNTER_CFG, /**< Counter Configuration (CNTRS_CTRL) */
+ TF_METER_CFG, /**< Meter Config(ACTP4_FMTCR) */
+ TF_METER_INTERVAL_CFG, /**< Meter Interval Config(FMTCR_INTERVAL) */
TF_GLOBAL_CFG_TYPE_MAX
};
TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METER,
0, 0, 0
},
+ [TF_TBL_TYPE_METER_DROP_CNT] = {
+ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METER_DROP_CNT,
+ 0, 0, 0
+ },
[TF_TBL_TYPE_MIRROR_CONFIG] = {
TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_MIRROR,
0, 0, 0
},
+ [TF_TBL_TYPE_METADATA] = {
+ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METADATA,
+ 0, 0, 0
+ },
/* Policy - ARs in bank 1 */
[TF_TBL_TYPE_FULL_ACT_RECORD] = {
.cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT,
[TF_COUNTER_CFG] = {
TF_GLOBAL_CFG_CFG_HCAPI, TF_COUNTER_CFG
},
+ [TF_METER_CFG] = {
+ TF_GLOBAL_CFG_CFG_HCAPI, TF_METER_CFG
+ },
+ [TF_METER_INTERVAL_CFG] = {
+ TF_GLOBAL_CFG_CFG_HCAPI, TF_METER_INTERVAL_CFG
+ },
};
#endif /* _TF_DEVICE_P58_H_ */
}
}
- /* Verify that the entry has been previously allocated */
- aparms.rm_db = tbl_db->tbl_db[parms->dir];
- aparms.subtype = parms->type;
- TF_TBL_PTR_TO_RM(&aparms.index, parms->idx, base, shift);
-
- aparms.allocated = &allocated;
- rc = tf_rm_is_allocated(&aparms);
- if (rc)
- return rc;
+ /* Do not check meter drop counter because it is not allocated
+ * resources
+ */
+ if (parms->type != TF_TBL_TYPE_METER_DROP_CNT) {
+ /* Verify that the entry has been previously allocated */
+ aparms.rm_db = tbl_db->tbl_db[parms->dir];
+ aparms.subtype = parms->type;
+ TF_TBL_PTR_TO_RM(&aparms.index, parms->idx, base, shift);
+
+ aparms.allocated = &allocated;
+ rc = tf_rm_is_allocated(&aparms);
+ if (rc)
+ return rc;
- if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
- TFP_DRV_LOG(ERR,
- "%s, Invalid or not allocated index, type:%d, idx:%d\n",
- tf_dir_2_str(parms->dir),
- parms->type,
- parms->idx);
- return -EINVAL;
+ if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
+ TFP_DRV_LOG(ERR,
+ "%s, Invalid or not allocated index, type:%d, idx:%d\n",
+ tf_dir_2_str(parms->dir),
+ parms->type,
+ parms->idx);
+ return -EINVAL;
+ }
}
/* Set the entry */
}
}
- /* Verify that the entry has been previously allocated */
- aparms.rm_db = tbl_db->tbl_db[parms->dir];
- aparms.subtype = parms->type;
- TF_TBL_PTR_TO_RM(&aparms.index, parms->idx, base, shift);
-
- aparms.allocated = &allocated;
- rc = tf_rm_is_allocated(&aparms);
- if (rc)
- return rc;
+ /* Do not check meter drop counter because it is not allocated
+ * resources.
+ */
+ if (parms->type != TF_TBL_TYPE_METER_DROP_CNT) {
+ /* Verify that the entry has been previously allocated */
+ aparms.rm_db = tbl_db->tbl_db[parms->dir];
+ aparms.subtype = parms->type;
+ TF_TBL_PTR_TO_RM(&aparms.index, parms->idx, base, shift);
+
+ aparms.allocated = &allocated;
+ rc = tf_rm_is_allocated(&aparms);
+ if (rc)
+ return rc;
- if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
- TFP_DRV_LOG(ERR,
- "%s, Invalid or not allocated index, type:%d, idx:%d\n",
- tf_dir_2_str(parms->dir),
- parms->type,
- parms->idx);
- return -EINVAL;
+ if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
+ TFP_DRV_LOG(ERR,
+ "%s, Invalid or not allocated index, type:%d, idx:%d\n",
+ tf_dir_2_str(parms->dir),
+ parms->type,
+ parms->idx);
+ return -EINVAL;
+ }
}
/* Set the entry */