net/mlx5: introduce buffer size parameter for hairpin
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index d7c519b..ca6a802 100644 (file)
@@ -191,6 +191,7 @@ struct mlx5_dev_config {
        unsigned int tso_max_payload_sz; /* Maximum TCP payload for TSO. */
        unsigned int ind_table_max_size; /* Maximum indirection table size. */
        unsigned int max_dump_files_num; /* Maximum dump files per queue. */
+       unsigned int log_hp_size; /* Single hairpin queue data size in total. */
        int txqs_inline; /* Queue number threshold for inlining. */
        int txq_inline_min; /* Minimal amount of data bytes to inline. */
        int txq_inline_max; /* Max packet size for inlining with SEND. */
@@ -517,6 +518,8 @@ struct mlx5_priv {
        struct mlx5_drop drop_queue; /* Flow drop queues. */
        struct mlx5_flows flows; /* RTE Flow rules. */
        struct mlx5_flows ctrl_flows; /* Control flow rules. */
+       void *inter_flows; /* Intermediate resources for flow creation. */
+       int flow_idx; /* Intermediate device flow index. */
        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. */
@@ -712,7 +715,8 @@ 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);
+void mlx5_flow_list_flush(struct rte_eth_dev *dev, struct mlx5_flows *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,
@@ -725,6 +729,10 @@ int mlx5_dev_filter_ctrl(struct rte_eth_dev *dev,
                         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_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);
+void mlx5_flow_free_intermediate(struct rte_eth_dev *dev);
 int mlx5_flow_verify(struct rte_eth_dev *dev);
 int mlx5_ctrl_flow_source_queue(struct rte_eth_dev *dev, uint32_t queue);
 int mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
@@ -764,7 +772,6 @@ void mlx5_mp_uninit_secondary(void);
 /* mlx5_socket.c */
 
 int mlx5_pmd_socket_init(void);
-void mlx5_pmd_socket_uninit(void);
 
 /* mlx5_flow_meter.c */