DPDK 22.11.6
rte_regexdev_core.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020 Mellanox Technologies, Ltd
3 */
4
5#ifndef _RTE_REGEX_CORE_H_
6#define _RTE_REGEX_CORE_H_
7
20struct rte_regexdev;
21
22typedef int (*regexdev_info_get_t)(struct rte_regexdev *dev,
23 struct rte_regexdev_info *info);
26typedef int (*regexdev_configure_t)(struct rte_regexdev *dev,
27 const struct rte_regexdev_config *cfg);
30typedef int (*regexdev_qp_setup_t)(struct rte_regexdev *dev, uint16_t id,
31 const struct rte_regexdev_qp_conf *qp_conf);
34typedef int (*regexdev_start_t)(struct rte_regexdev *dev);
37typedef int (*regexdev_stop_t)(struct rte_regexdev *dev);
40typedef int (*regexdev_close_t)(struct rte_regexdev *dev);
43typedef int (*regexdev_attr_get_t)(struct rte_regexdev *dev,
45 void *value);
48typedef int (*regexdev_attr_set_t)(struct rte_regexdev *dev,
50 const void *value);
53typedef int (*regexdev_rule_db_update_t)(struct rte_regexdev *dev,
54 const struct rte_regexdev_rule *rules,
55 uint16_t nb_rules);
58typedef int (*regexdev_rule_db_compile_activate_t)(struct rte_regexdev *dev);
61typedef int (*regexdev_rule_db_import_t)(struct rte_regexdev *dev,
62 const char *rule_db,
63 uint32_t rule_db_len);
66typedef int (*regexdev_rule_db_export_t)(struct rte_regexdev *dev,
67 char *rule_db);
70typedef int (*regexdev_xstats_names_get_t)(struct rte_regexdev *dev,
72 *xstats_map);
75typedef int (*regexdev_xstats_get_t)(struct rte_regexdev *dev,
76 const uint16_t *ids, uint64_t *values,
77 uint16_t nb_values);
80typedef int (*regexdev_xstats_by_name_get_t)(struct rte_regexdev *dev,
81 const char *name, uint16_t *id,
82 uint64_t *value);
85typedef int (*regexdev_xstats_reset_t)(struct rte_regexdev *dev,
86 const uint16_t *ids,
87 uint16_t nb_ids);
90typedef int (*regexdev_selftest_t)(struct rte_regexdev *dev);
93typedef int (*regexdev_dump_t)(struct rte_regexdev *dev, FILE *f);
96typedef uint16_t (*regexdev_enqueue_t)(struct rte_regexdev *dev, uint16_t qp_id,
97 struct rte_regex_ops **ops,
98 uint16_t nb_ops);
101typedef uint16_t (*regexdev_dequeue_t)(struct rte_regexdev *dev, uint16_t qp_id,
102 struct rte_regex_ops **ops,
103 uint16_t nb_ops);
110 regexdev_info_get_t dev_info_get;
111 regexdev_configure_t dev_configure;
112 regexdev_qp_setup_t dev_qp_setup;
113 regexdev_start_t dev_start;
114 regexdev_stop_t dev_stop;
115 regexdev_close_t dev_close;
116 regexdev_attr_get_t dev_attr_get;
117 regexdev_attr_set_t dev_attr_set;
118 regexdev_rule_db_update_t dev_rule_db_update;
119 regexdev_rule_db_compile_activate_t dev_rule_db_compile_activate;
120 regexdev_rule_db_import_t dev_db_import;
121 regexdev_rule_db_export_t dev_db_export;
122 regexdev_xstats_names_get_t dev_xstats_names_get;
123 regexdev_xstats_get_t dev_xstats_get;
124 regexdev_xstats_by_name_get_t dev_xstats_by_name_get;
125 regexdev_xstats_reset_t dev_xstats_reset;
126 regexdev_selftest_t dev_selftest;
127 regexdev_dump_t dev_dump;
128};
129
139};
140
148struct rte_regexdev_data {
149 void *dev_private;
150 char dev_name[RTE_REGEXDEV_NAME_MAX_LEN];
151 uint16_t dev_id;
152 struct rte_regexdev_config dev_conf;
153 uint8_t dev_started : 1;
155
166struct rte_regexdev {
167 regexdev_enqueue_t enqueue;
168 regexdev_dequeue_t dequeue;
169 const struct rte_regexdev_ops *dev_ops;
171 struct rte_device *device;
172 enum rte_regexdev_state state;
173 struct rte_regexdev_data *data;
175
181extern struct rte_regexdev rte_regex_devices[];
182
183#endif /* _RTE_REGEX_CORE_H_ */
#define __rte_cache_aligned
Definition: rte_common.h:440
void * dev_private
rte_regexdev_attr_id
Definition: rte_regexdev.h:871
rte_regexdev_state
@ RTE_REGEXDEV_READY
@ RTE_REGEXDEV_REGISTERED
@ RTE_REGEXDEV_UNUSED