regex/mlx5: add engine status check
[dpdk.git] / drivers / regex / mlx5 / mlx5_regex.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2020 Mellanox Technologies, Ltd
3  */
4
5 #ifndef MLX5_REGEX_H
6 #define MLX5_REGEX_H
7
8 #include <rte_regexdev.h>
9
10 struct mlx5_regex_priv {
11         TAILQ_ENTRY(mlx5_regex_priv) next;
12         struct ibv_context *ctx; /* Device context. */
13         struct rte_pci_device *pci_dev;
14         struct rte_regexdev *regexdev; /* Pointer to the RegEx dev. */
15 };
16
17 /* mlx5_rxp.c */
18 int mlx5_regex_info_get(struct rte_regexdev *dev,
19                         struct rte_regexdev_info *info);
20
21 /* mlx5_regex_devx.c */
22 int mlx5_devx_regex_register_write(struct ibv_context *ctx, int engine_id,
23                                    uint32_t addr, uint32_t data);
24 int mlx5_devx_regex_register_read(struct ibv_context *ctx, int engine_id,
25                                   uint32_t addr, uint32_t *data);
26
27 #endif /* MLX5_REGEX_H */