net/mlx5: set dynamic flow metadata in Rx queues
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 59421dc..50349ab 100644 (file)
 
 
 enum mlx5_ipool_index {
+#ifdef HAVE_IBV_FLOW_DV_SUPPORT
        MLX5_IPOOL_DECAP_ENCAP = 0, /* Pool for encap/decap resource. */
        MLX5_IPOOL_PUSH_VLAN, /* Pool for push vlan resource. */
        MLX5_IPOOL_TAG, /* Pool for tag resource. */
        MLX5_IPOOL_PORT_ID, /* Pool for port id resource. */
        MLX5_IPOOL_JUMP, /* Pool for jump resource. */
+#endif
+       MLX5_IPOOL_MTR, /* Pool for meter resource. */
+       MLX5_IPOOL_MCP, /* Pool for metadata resource. */
+       MLX5_IPOOL_HRXQ, /* Pool for hrxq resource. */
+       MLX5_IPOOL_MLX5_FLOW, /* Pool for mlx5 flow handle. */
+       MLX5_IPOOL_RTE_FLOW, /* Pool for rte_flow. */
        MLX5_IPOOL_MAX,
 };
 
@@ -103,9 +110,6 @@ struct mlx5_stats_ctrl {
        uint64_t imissed;
 };
 
-/* Flow list . */
-TAILQ_HEAD(mlx5_flows, rte_flow);
-
 /* Default PMD specific parameter value. */
 #define MLX5_ARG_UNSET (-1)
 
@@ -506,14 +510,15 @@ struct mlx5_priv {
        unsigned int (*reta_idx)[]; /* RETA index table. */
        unsigned int reta_idx_n; /* RETA index size. */
        struct mlx5_drop drop_queue; /* Flow drop queues. */
-       struct mlx5_flows flows; /* RTE Flow rules. */
-       struct mlx5_flows ctrl_flows; /* Control flow rules. */
+       uint32_t flows; /* RTE Flow rules. */
+       uint32_t ctrl_flows; /* Control flow rules. */
        void *inter_flows; /* Intermediate resources for flow creation. */
+       void *rss_desc; /* Intermediate rss description resources. */
        int flow_idx; /* Intermediate device flow index. */
        int flow_nested_idx; /* Intermediate device flow index, nested. */
        LIST_HEAD(rxq, mlx5_rxq_ctrl) rxqsctrl; /* DPDK Rx queues. */
        LIST_HEAD(rxqobj, mlx5_rxq_obj) rxqsobj; /* Verbs/DevX Rx queues. */
-       LIST_HEAD(hrxq, mlx5_hrxq) hrxqs; /* Verbs Hash Rx queues. */
+       uint32_t hrxqs; /* Verbs Hash Rx queues. */
        LIST_HEAD(txq, mlx5_txq_ctrl) txqsctrl; /* DPDK Tx queues. */
        LIST_HEAD(txqobj, mlx5_txq_obj) txqsobj; /* Verbs/DevX Tx queues. */
        /* Indirection tables. */
@@ -550,6 +555,7 @@ struct mlx5_priv {
        uint8_t skip_default_rss_reta; /* Skip configuration of default reta. */
        uint8_t fdb_def_rule; /* Whether fdb jump to table 1 is configured. */
        struct mlx5_mp_id mp_id; /* ID of a multi-process process */
+       LIST_HEAD(fdir, mlx5_fdir_flow) fdir_flows; /* fdir flows. */
 };
 
 #define PORT_ID(priv) ((priv)->dev_data->port_id)
@@ -707,8 +713,7 @@ struct rte_flow *mlx5_flow_create(struct rte_eth_dev *dev,
                                  struct rte_flow_error *error);
 int mlx5_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
                      struct rte_flow_error *error);
-void mlx5_flow_list_flush(struct rte_eth_dev *dev, struct mlx5_flows *list,
-                         bool active);
+void mlx5_flow_list_flush(struct rte_eth_dev *dev, uint32_t *list, bool active);
 int mlx5_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error);
 int mlx5_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
                    const struct rte_flow_action *action, void *data,
@@ -719,8 +724,8 @@ int mlx5_dev_filter_ctrl(struct rte_eth_dev *dev,
                         enum rte_filter_type filter_type,
                         enum rte_filter_op filter_op,
                         void *arg);
-int mlx5_flow_start(struct rte_eth_dev *dev, struct mlx5_flows *list);
-void mlx5_flow_stop(struct rte_eth_dev *dev, struct mlx5_flows *list);
+int mlx5_flow_start(struct rte_eth_dev *dev, uint32_t *list);
+void mlx5_flow_stop(struct rte_eth_dev *dev, uint32_t *list);
 int mlx5_flow_start_default(struct rte_eth_dev *dev);
 void mlx5_flow_stop_default(struct rte_eth_dev *dev);
 void mlx5_flow_alloc_intermediate(struct rte_eth_dev *dev);
@@ -748,6 +753,7 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
                       bool clear, uint64_t *pkts, uint64_t *bytes);
 int mlx5_flow_dev_dump(struct rte_eth_dev *dev, FILE *file,
                       struct rte_flow_error *error);
+void mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev);
 
 /* mlx5_mp.c */
 int mlx5_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer);