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_compat.h> 18 #include "rte_regexdev.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 /** 25 * @internal 26 * Register a RegEx device slot for a RegEx device and return the 27 * pointer to that slot. 28 * 29 * @param name 30 * RegEx device name. 31 * 32 * @return 33 * A pointer to the RegEx device slot case of success, 34 * NULL otherwise. 35 */ 36 __rte_internal 37 struct rte_regexdev *rte_regexdev_register(const char *name); 38 39 /** 40 * @internal 41 * Unregister the specified regexdev port. 42 * 43 * @param dev 44 * Device to be released. 45 */ 46 __rte_internal 47 void rte_regexdev_unregister(struct rte_regexdev *dev); 48 49 /** 50 * @internal 51 * Return the RegEx device based on the device name. 52 * 53 * @param name 54 * The device name. 55 */ 56 __rte_internal 57 struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name); 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif /* _RTE_REGEXDEV_DRIVER_H_ */ 64