net/mlx5: replace flow list with indexed pool
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.h
index 09d6d60..745a1fb 100644 (file)
@@ -998,9 +998,9 @@ flow_items_to_tunnel(const struct rte_flow_item items[])
 
 /* Flow structure. */
 struct rte_flow {
-       ILIST_ENTRY(uint32_t)next; /**< Index to the next flow structure. */
        uint32_t dev_handles;
        /**< Device flow handles that are part of the flow. */
+       uint32_t type:2;
        uint32_t drv_type:2; /**< Driver type. */
        uint32_t tunnel:1;
        uint32_t meter:24; /**< Holds flow meter id. */
@@ -1161,6 +1161,12 @@ typedef struct mlx5_flow_meter_sub_policy *
                (struct rte_eth_dev *dev,
                struct mlx5_flow_meter_policy *mtr_policy,
                struct mlx5_flow_rss_desc *rss_desc[MLX5_MTR_RTE_COLORS]);
+typedef int (*mlx5_flow_meter_hierarchy_rule_create_t)
+               (struct rte_eth_dev *dev,
+               struct mlx5_flow_meter_info *fm,
+               int32_t src_port,
+               const struct rte_flow_item *item,
+               struct rte_flow_error *error);
 typedef void (*mlx5_flow_destroy_sub_policy_with_rxq_t)
        (struct rte_eth_dev *dev,
        struct mlx5_flow_meter_policy *mtr_policy);
@@ -1257,6 +1263,7 @@ struct mlx5_flow_driver_ops {
        mlx5_flow_create_def_policy_t create_def_policy;
        mlx5_flow_destroy_def_policy_t destroy_def_policy;
        mlx5_flow_meter_sub_policy_rss_prepare_t meter_sub_policy_rss_prepare;
+       mlx5_flow_meter_hierarchy_rule_create_t meter_hierarchy_rule_create;
        mlx5_flow_destroy_sub_policy_with_rxq_t destroy_sub_policy_with_rxq;
        mlx5_flow_counter_alloc_t counter_alloc;
        mlx5_flow_counter_free_t counter_free;
@@ -1526,8 +1533,10 @@ int mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
                                 uint64_t item_flags,
                                 struct rte_eth_dev *dev,
                                 struct rte_flow_error *error);
-int mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
+int mlx5_flow_validate_item_vxlan(struct rte_eth_dev *dev,
+                                 const struct rte_flow_item *item,
                                  uint64_t item_flags,
+                                 const struct rte_flow_attr *attr,
                                  struct rte_flow_error *error);
 int mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
                                      uint64_t item_flags,