net/mlx5: move flow priority discovery to Verbs file
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.h
index 22cc356..314b5e3 100644 (file)
@@ -128,6 +128,9 @@ enum mlx5_feature_name {
 /* Pattern tunnel Layer bits (continued). */
 #define MLX5_FLOW_LAYER_GTP (1u << 28)
 
+/* Pattern eCPRI Layer bit. */
+#define MLX5_FLOW_LAYER_ECPRI (UINT64_C(1) << 29)
+
 /* Outer Masks. */
 #define MLX5_FLOW_LAYER_OUTER_L3 \
        (MLX5_FLOW_LAYER_OUTER_L3_IPV4 | MLX5_FLOW_LAYER_OUTER_L3_IPV6)
@@ -436,7 +439,7 @@ struct mlx5_flow_dv_modify_hdr_resource {
        LIST_ENTRY(mlx5_flow_dv_modify_hdr_resource) next;
        /* Pointer to next element. */
        rte_atomic32_t refcnt; /**< Reference counter. */
-       struct ibv_flow_action *action;
+       void *action;
        /**< Modify header action object. */
        uint8_t ft_type; /**< Flow table type, Rx or Tx. */
        uint32_t actions_num; /**< Number of modification actions. */
@@ -919,6 +922,7 @@ int mlx5_flow_group_to_table(const struct rte_flow_attr *attributes,
 uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow_rss_desc *rss_desc,
                                     int tunnel, uint64_t layer_types,
                                     uint64_t hash_fields);
+int mlx5_flow_discover_priorities(struct rte_eth_dev *dev);
 uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
                                   uint32_t subpriority);
 int mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
@@ -1027,6 +1031,12 @@ int mlx5_flow_validate_item_geneve(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_ecpri(const struct rte_flow_item *item,
+                                 uint64_t item_flags,
+                                 uint64_t last_item,
+                                 uint16_t ether_type,
+                                 const struct rte_flow_item_ecpri *acc_mask,
+                                 struct rte_flow_error *error);
 struct mlx5_meter_domains_infos *mlx5_flow_create_mtr_tbls
                                        (struct rte_eth_dev *dev,
                                         const struct mlx5_flow_meter *fm);