1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020 Mellanox Technologies, Ltd
8 #include <rte_regexdev.h>
10 struct mlx5_regex_sq {
11 uint32_t nb_desc; /* Number of desc for this object. */
14 struct mlx5_regex_qp {
15 uint32_t flags; /* QP user flags. */
16 uint32_t nb_desc; /* Total number of desc for this qp. */
17 struct mlx5_regex_sq *sqs; /* Pointer to sq array. */
20 struct mlx5_regex_priv {
21 TAILQ_ENTRY(mlx5_regex_priv) next;
22 struct ibv_context *ctx; /* Device context. */
23 struct rte_pci_device *pci_dev;
24 struct rte_regexdev *regexdev; /* Pointer to the RegEx dev. */
25 uint16_t nb_queues; /* Number of queues. */
26 struct mlx5_regex_qp *qps; /* Pointer to the qp array. */
27 uint16_t nb_max_matches; /* Max number of matches. */
31 int mlx5_regex_info_get(struct rte_regexdev *dev,
32 struct rte_regexdev_info *info);
33 int mlx5_regex_configure(struct rte_regexdev *dev,
34 const struct rte_regexdev_config *cfg);
36 /* mlx5_regex_devx.c */
37 int mlx5_devx_regex_register_write(struct ibv_context *ctx, int engine_id,
38 uint32_t addr, uint32_t data);
39 int mlx5_devx_regex_register_read(struct ibv_context *ctx, int engine_id,
40 uint32_t addr, uint32_t *data);
42 #endif /* MLX5_REGEX_H */