net/mlx5: move flow priority discovery to Verbs file
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index bb2c096..2edec7a 100644 (file)
@@ -216,6 +216,9 @@ struct mlx5_dev_config {
        unsigned int devx:1; /* Whether devx interface is available or not. */
        unsigned int dest_tir:1; /* Whether advanced DR API is available. */
        unsigned int reclaim_mode:2; /* Memory reclaim mode. */
+       unsigned int rt_timestamp:1; /* realtime timestamp format. */
+       unsigned int sys_mem_en:1; /* The default memory allocator. */
+       unsigned int decap_en:1; /* Whether decap will be used or not. */
        struct {
                unsigned int enabled:1; /* Whether MPRQ is enabled. */
                unsigned int stride_num_n; /* Number of strides. */
@@ -585,6 +588,22 @@ struct mlx5_dev_txpp {
        rte_atomic32_t err_miss_int; /* Missed service interrupt. */
        rte_atomic32_t err_rearm_queue; /* Rearm Queue errors. */
        rte_atomic32_t err_clock_queue; /* Clock Queue errors. */
+       rte_atomic32_t err_ts_past; /* Timestamp in the past. */
+       rte_atomic32_t err_ts_future; /* Timestamp in the distant future. */
+};
+
+/* Supported flex parser profile ID. */
+enum mlx5_flex_parser_profile_id {
+       MLX5_FLEX_PARSER_ECPRI_0 = 0,
+       MLX5_FLEX_PARSER_MAX = 8,
+};
+
+/* Sample ID information of flex parser structure. */
+struct mlx5_flex_parser_profiles {
+       uint32_t num;           /* Actual number of samples. */
+       uint32_t ids[8];        /* Sample IDs for this profile. */
+       uint8_t offset[8];      /* Bytes offset of each parser. */
+       void *obj;              /* Flex parser node object. */
 };
 
 /*
@@ -646,6 +665,8 @@ struct mlx5_dev_ctx_shared {
        struct mlx5_devx_obj *td; /* Transport domain. */
        struct mlx5_flow_id_pool *flow_id_pool; /* Flow ID pool. */
        struct mlx5dv_devx_uar *tx_uar; /* Tx/packer pacing shared UAR. */
+       struct mlx5_flex_parser_profiles fp[MLX5_FLEX_PARSER_MAX];
+       /* Flex parser profiles information. */
        struct mlx5_dev_shared_port port[]; /* per device port data array. */
 };
 
@@ -781,6 +802,8 @@ int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
 int mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu);
 int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
                         struct rte_eth_hairpin_cap *cap);
+bool mlx5_flex_parser_ecpri_exist(struct rte_eth_dev *dev);
+int mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev);
 
 /* mlx5_ethdev.c */
 
@@ -904,7 +927,6 @@ int mlx5_traffic_restart(struct rte_eth_dev *dev);
 
 int mlx5_flow_discover_mreg_c(struct rte_eth_dev *eth_dev);
 bool mlx5_flow_ext_mreg_supported(struct rte_eth_dev *dev);
-int mlx5_flow_discover_priorities(struct rte_eth_dev *dev);
 void mlx5_flow_print(struct rte_flow *flow);
 int mlx5_flow_validate(struct rte_eth_dev *dev,
                       const struct rte_flow_attr *attr,
@@ -1004,10 +1026,19 @@ int mlx5_os_get_stats_n(struct rte_eth_dev *dev);
 void mlx5_os_stats_init(struct rte_eth_dev *dev);
 void mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t *reg_mr_cb,
                           mlx5_dereg_mr_t *dereg_mr_cb);
+
 /* mlx5_txpp.c */
 
 int mlx5_txpp_start(struct rte_eth_dev *dev);
 void mlx5_txpp_stop(struct rte_eth_dev *dev);
+int mlx5_txpp_read_clock(struct rte_eth_dev *dev, uint64_t *timestamp);
+int mlx5_txpp_xstats_get(struct rte_eth_dev *dev,
+                        struct rte_eth_xstat *stats,
+                        unsigned int n, unsigned int n_used);
+int mlx5_txpp_xstats_reset(struct rte_eth_dev *dev);
+int mlx5_txpp_xstats_get_names(struct rte_eth_dev *dev,
+                              struct rte_eth_xstat_name *xstats_names,
+                              unsigned int n, unsigned int n_used);
 void mlx5_txpp_interrupt_handler(void *cb_arg);
 
 #endif /* RTE_PMD_MLX5_H_ */