[14/27] common/cnxk: support meter in action list

Message ID 20210906075450.1452123-14-skori@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series [01/27] common/cnxk: update policer MBOX APIs and HW definitions |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sunil Kumar Kori Sept. 6, 2021, 7:54 a.m. UTC
  From: Sunil Kumar Kori <skori@marvell.com>

Meter action is added in supported action list.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/common/cnxk/roc_npc.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index bab25fd72e..0853889a32 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -58,7 +58,7 @@  struct roc_npc_flow_item_raw {
 	const uint8_t *pattern; /**< Byte string to look for. */
 };
 
-#define ROC_NPC_MAX_ACTION_COUNT 12
+#define ROC_NPC_MAX_ACTION_COUNT 17
 
 enum roc_npc_action_type {
 	ROC_NPC_ACTION_TYPE_END = (1 << 0),
@@ -77,6 +77,7 @@  enum roc_npc_action_type {
 	ROC_NPC_ACTION_TYPE_VLAN_INSERT = (1 << 13),
 	ROC_NPC_ACTION_TYPE_VLAN_ETHTYPE_INSERT = (1 << 14),
 	ROC_NPC_ACTION_TYPE_VLAN_PCP_INSERT = (1 << 15),
+	ROC_NPC_ACTION_TYPE_METER = (1 << 16),
 };
 
 struct roc_npc_action {
@@ -110,6 +111,10 @@  struct roc_npc_action_of_set_vlan_pcp {
 	uint8_t vlan_pcp; /**< VLAN priority. */
 };
 
+struct roc_npc_action_meter {
+	uint32_t mtr_id; /**< Meter id to be applied. > */
+};
+
 struct roc_npc_attr {
 	uint32_t priority;	/**< Rule priority level within group. */
 	uint32_t ingress : 1;	/**< Rule applies to ingress traffic. */