From: Satheesh Paul <psatheesh@marvell.com>
Add roc API to get mark action.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
---
drivers/common/cnxk/roc_npc.c | 17 +++++++++++++++++
drivers/common/cnxk/roc_npc.h | 3 +++
drivers/common/cnxk/version.map | 2 ++
3 files changed, 22 insertions(+)
@@ -757,6 +757,23 @@ npc_rss_action_program(struct roc_npc *roc_npc,
return 0;
}
+int
+roc_npc_mark_actions_get(struct roc_npc *roc_npc)
+{
+ struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+
+ return npc->mark_actions;
+}
+
+int
+roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc, uint32_t count)
+{
+ struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+
+ npc->mark_actions -= count;
+ return npc->mark_actions;
+}
+
struct roc_npc_flow *
roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
const struct roc_npc_item_info pattern[],
@@ -196,4 +196,7 @@ int __roc_api roc_npc_mcam_free_all_resources(struct roc_npc *roc_npc);
void __roc_api roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc);
void __roc_api roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc,
struct roc_npc_flow *mcam);
+int __roc_api roc_npc_mark_actions_get(struct roc_npc *roc_npc);
+int __roc_api roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc,
+ uint32_t count);
#endif /* _ROC_NPC_H_ */
@@ -165,6 +165,8 @@ INTERNAL {
roc_npc_flow_parse;
roc_npc_get_low_priority_mcam;
roc_npc_init;
+ roc_npc_mark_actions_get;
+ roc_npc_mark_actions_sub_return;
roc_npc_mcam_alloc_entries;
roc_npc_mcam_alloc_entry;
roc_npc_mcam_clear_counter;