xref: /dpdk/lib/regexdev/rte_regexdev_driver.h (revision 89e290eb)
199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
299a2dd95SBruce Richardson  * Copyright 2020 Mellanox Technologies, Ltd
399a2dd95SBruce Richardson  */
499a2dd95SBruce Richardson 
599a2dd95SBruce Richardson #ifndef _RTE_REGEXDEV_DRIVER_H_
699a2dd95SBruce Richardson #define _RTE_REGEXDEV_DRIVER_H_
799a2dd95SBruce Richardson 
899a2dd95SBruce Richardson /**
999a2dd95SBruce Richardson  * @file
1099a2dd95SBruce Richardson  *
1199a2dd95SBruce Richardson  * RTE RegEx Device PMD API
1299a2dd95SBruce Richardson  *
1399a2dd95SBruce Richardson  * APIs that are used by the RegEx drivers, to communicate with the
1499a2dd95SBruce Richardson  * RegEx lib.
1599a2dd95SBruce Richardson  */
1699a2dd95SBruce Richardson 
1799a2dd95SBruce Richardson #include "rte_regexdev.h"
1899a2dd95SBruce Richardson 
1999a2dd95SBruce Richardson #ifdef __cplusplus
2099a2dd95SBruce Richardson extern "C" {
2199a2dd95SBruce Richardson #endif
2299a2dd95SBruce Richardson 
2399a2dd95SBruce Richardson /**
2499a2dd95SBruce Richardson  * @internal
2599a2dd95SBruce Richardson  * Register a RegEx device slot for a RegEx device and return the
2699a2dd95SBruce Richardson  * pointer to that slot.
2799a2dd95SBruce Richardson  *
2899a2dd95SBruce Richardson  * @param name
2999a2dd95SBruce Richardson  *   RegEx device name.
3099a2dd95SBruce Richardson  *
3199a2dd95SBruce Richardson  * @return
3299a2dd95SBruce Richardson  *   A pointer to the RegEx device slot case of success,
3399a2dd95SBruce Richardson  *   NULL otherwise.
3499a2dd95SBruce Richardson  */
35*89e290ebSThomas Monjalon __rte_internal
3699a2dd95SBruce Richardson struct rte_regexdev *rte_regexdev_register(const char *name);
3799a2dd95SBruce Richardson 
3899a2dd95SBruce Richardson /**
3999a2dd95SBruce Richardson  * @internal
4099a2dd95SBruce Richardson  * Unregister the specified regexdev port.
4199a2dd95SBruce Richardson  *
4299a2dd95SBruce Richardson  * @param dev
4399a2dd95SBruce Richardson  *   Device to be released.
4499a2dd95SBruce Richardson  */
45*89e290ebSThomas Monjalon __rte_internal
4699a2dd95SBruce Richardson void rte_regexdev_unregister(struct rte_regexdev *dev);
4799a2dd95SBruce Richardson 
4899a2dd95SBruce Richardson /**
4999a2dd95SBruce Richardson  * @internal
5099a2dd95SBruce Richardson  * Return the RegEx device based on the device name.
5199a2dd95SBruce Richardson  *
5299a2dd95SBruce Richardson  * @param name
5399a2dd95SBruce Richardson  *   The device name.
5499a2dd95SBruce Richardson  */
55*89e290ebSThomas Monjalon __rte_internal
5699a2dd95SBruce Richardson struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name);
5799a2dd95SBruce Richardson 
5899a2dd95SBruce Richardson #ifdef __cplusplus
5999a2dd95SBruce Richardson }
6099a2dd95SBruce Richardson #endif
6199a2dd95SBruce Richardson 
6299a2dd95SBruce Richardson #endif /* _RTE_REGEXDEV_DRIVER_H_ */
63