common/cnxk: add new PCI IDs to supported devices
[dpdk.git] / drivers / common / cnxk / roc_npc.h
index 4d6f8f8..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];
@@ -216,15 +222,12 @@ int __roc_api roc_npc_flow_parse(struct roc_npc *roc_npc,
                                 const struct roc_npc_action actions[],
                                 struct roc_npc_flow *flow);
 int __roc_api roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc);
-
 int __roc_api roc_npc_mcam_free_counter(struct roc_npc *roc_npc,
                                        uint16_t ctr_id);
-
 int __roc_api roc_npc_mcam_read_counter(struct roc_npc *roc_npc,
                                        uint32_t ctr_id, uint64_t *count);
 int __roc_api roc_npc_mcam_clear_counter(struct roc_npc *roc_npc,
                                         uint32_t ctr_id);
-
 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,
@@ -235,4 +238,6 @@ int __roc_api roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc,
 int __roc_api roc_npc_vtag_actions_get(struct roc_npc *roc_npc);
 int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc,
                                              uint32_t count);
+int __roc_api roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
+                                                   struct roc_npc_flow *flow);
 #endif /* _ROC_NPC_H_ */