common/cnxk: use computed value for WQE skip
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 0f0045a..ef755ee 100644 (file)
@@ -779,6 +779,8 @@ struct mlx5_flow_meter_policy {
        /* If yellow color policy is skipped. */
        uint32_t skip_g:1;
        /* If green color policy is skipped. */
+       uint32_t mark:1;
+       /* If policy contains mark action. */
        rte_spinlock_t sl;
        uint32_t ref_cnt;
        /* Use count. */
@@ -857,6 +859,8 @@ struct mlx5_flow_meter_info {
        uint32_t transfer:1;
        uint32_t def_policy:1;
        /* Meter points to default policy. */
+       uint32_t color_aware:1;
+       /* Meter is color aware mode. */
        void *drop_rule[MLX5_MTR_DOMAIN_MAX];
        /* Meter drop rule in drop table. */
        uint32_t drop_cnt;
@@ -865,8 +869,10 @@ struct mlx5_flow_meter_info {
        /**< Use count. */
        struct mlx5_indexed_pool *flow_ipool;
        /**< Index pool for flow id. */
-       void *meter_action;
+       void *meter_action_g;
        /**< Flow meter action. */
+       void *meter_action_y;
+       /**< Flow meter action for yellow init_color. */
 };
 
 /* PPS(packets per second) map to BPS(Bytes per second).
@@ -993,7 +999,6 @@ union mlx5_flow_tbl_key {
 /* Table structure. */
 struct mlx5_flow_tbl_resource {
        void *obj; /**< Pointer to DR table object. */
-       uint32_t refcnt; /**< Reference counter. */
 };
 
 #define MLX5_MAX_TABLES UINT16_MAX
@@ -1870,6 +1875,10 @@ struct mlx5_flow_meter_policy *mlx5_flow_meter_policy_find
                (struct rte_eth_dev *dev,
                uint32_t policy_id,
                uint32_t *policy_idx);
+struct mlx5_flow_meter_info *
+mlx5_flow_meter_hierarchy_next_meter(struct mlx5_priv *priv,
+                                    struct mlx5_flow_meter_policy *policy,
+                                    uint32_t *mtr_idx);
 struct mlx5_flow_meter_policy *
 mlx5_flow_meter_hierarchy_get_final_policy(struct rte_eth_dev *dev,
                                        struct mlx5_flow_meter_policy *policy);