common/cnxk: support meter in action list
[dpdk.git] / drivers / common / cnxk / roc_npc.h
index 65d4bd6..10d1ac8 100644 (file)
@@ -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 19
 
 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 << 17),
 };
 
 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. */
@@ -128,6 +133,7 @@ struct roc_npc_flow {
        uint32_t mcam_id;
        int32_t ctr_id;
        uint32_t priority;
+       uint32_t mtr_id;
 #define ROC_NPC_MAX_MCAM_WIDTH_DWORDS 7
        /* Contiguous match string */
        uint64_t mcam_data[ROC_NPC_MAX_MCAM_WIDTH_DWORDS];