net/mlx5: support basic flow items and actions
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 82172e4..c415ce3 100644 (file)
@@ -59,6 +59,7 @@
 #include <rte_spinlock.h>
 #include <rte_interrupts.h>
 #include <rte_errno.h>
+#include <rte_flow.h>
 #ifdef PEDANTIC
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
@@ -135,6 +136,8 @@ struct priv {
        unsigned int reta_idx_n; /* RETA index size. */
        struct fdir_filter_list *fdir_filter_list; /* Flow director rules. */
        struct fdir_queue *fdir_drop_queue; /* Flow director drop queue. */
+       LIST_HEAD(mlx5_flows, rte_flow) flows; /* RTE Flow rules. */
+       uint32_t link_speed_capa; /* Link speed capabilities. */
        rte_spinlock_t lock; /* Lock for control functions. */
 };
 
@@ -267,4 +270,21 @@ void priv_fdir_enable(struct priv *);
 int mlx5_dev_filter_ctrl(struct rte_eth_dev *, enum rte_filter_type,
                         enum rte_filter_op, void *);
 
+/* mlx5_flow.c */
+
+int mlx5_flow_validate(struct rte_eth_dev *, const struct rte_flow_attr *,
+                      const struct rte_flow_item [],
+                      const struct rte_flow_action [],
+                      struct rte_flow_error *);
+struct rte_flow *mlx5_flow_create(struct rte_eth_dev *,
+                                 const struct rte_flow_attr *,
+                                 const struct rte_flow_item [],
+                                 const struct rte_flow_action [],
+                                 struct rte_flow_error *);
+int mlx5_flow_destroy(struct rte_eth_dev *, struct rte_flow *,
+                     struct rte_flow_error *);
+int mlx5_flow_flush(struct rte_eth_dev *, struct rte_flow_error *);
+int priv_flow_start(struct priv *);
+void priv_flow_stop(struct priv *);
+
 #endif /* RTE_PMD_MLX5_H_ */