1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright 2020 Mellanox Technologies, Ltd 3 */ 4 5 #ifndef _RTE_REGEXDEV_DRIVER_H_ 6 #define _RTE_REGEXDEV_DRIVER_H_ 7 8 /** 9 * @file 10 * 11 * RTE RegEx Device PMD API 12 * 13 * APIs that are used by the RegEx drivers, to communicate with the 14 * RegEx lib. 15 */ 16 17 #include "rte_regexdev.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 /** 24 * @internal 25 * Register a RegEx device slot for a RegEx device and return the 26 * pointer to that slot. 27 * 28 * @param name 29 * RegEx device name. 30 * 31 * @return 32 * A pointer to the RegEx device slot case of success, 33 * NULL otherwise. 34 */ 35 __rte_internal 36 struct rte_regexdev *rte_regexdev_register(const char *name); 37 38 /** 39 * @internal 40 * Unregister the specified regexdev port. 41 * 42 * @param dev 43 * Device to be released. 44 */ 45 __rte_internal 46 void rte_regexdev_unregister(struct rte_regexdev *dev); 47 48 /** 49 * @internal 50 * Return the RegEx device based on the device name. 51 * 52 * @param name 53 * The device name. 54 */ 55 __rte_internal 56 struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name); 57 58 #ifdef __cplusplus 59 } 60 #endif 61 62 #endif /* _RTE_REGEXDEV_DRIVER_H_ */ 63