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 17*1094dd94SDavid Marchand #include <rte_compat.h> 1899a2dd95SBruce Richardson #include "rte_regexdev.h" 1999a2dd95SBruce Richardson 2099a2dd95SBruce Richardson #ifdef __cplusplus 2199a2dd95SBruce Richardson extern "C" { 2299a2dd95SBruce Richardson #endif 2399a2dd95SBruce Richardson 2499a2dd95SBruce Richardson /** 2599a2dd95SBruce Richardson * @internal 2699a2dd95SBruce Richardson * Register a RegEx device slot for a RegEx device and return the 2799a2dd95SBruce Richardson * pointer to that slot. 2899a2dd95SBruce Richardson * 2999a2dd95SBruce Richardson * @param name 3099a2dd95SBruce Richardson * RegEx device name. 3199a2dd95SBruce Richardson * 3299a2dd95SBruce Richardson * @return 3399a2dd95SBruce Richardson * A pointer to the RegEx device slot case of success, 3499a2dd95SBruce Richardson * NULL otherwise. 3599a2dd95SBruce Richardson */ 3689e290ebSThomas Monjalon __rte_internal 3799a2dd95SBruce Richardson struct rte_regexdev *rte_regexdev_register(const char *name); 3899a2dd95SBruce Richardson 3999a2dd95SBruce Richardson /** 4099a2dd95SBruce Richardson * @internal 4199a2dd95SBruce Richardson * Unregister the specified regexdev port. 4299a2dd95SBruce Richardson * 4399a2dd95SBruce Richardson * @param dev 4499a2dd95SBruce Richardson * Device to be released. 4599a2dd95SBruce Richardson */ 4689e290ebSThomas Monjalon __rte_internal 4799a2dd95SBruce Richardson void rte_regexdev_unregister(struct rte_regexdev *dev); 4899a2dd95SBruce Richardson 4999a2dd95SBruce Richardson /** 5099a2dd95SBruce Richardson * @internal 5199a2dd95SBruce Richardson * Return the RegEx device based on the device name. 5299a2dd95SBruce Richardson * 5399a2dd95SBruce Richardson * @param name 5499a2dd95SBruce Richardson * The device name. 5599a2dd95SBruce Richardson */ 5689e290ebSThomas Monjalon __rte_internal 5799a2dd95SBruce Richardson struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name); 5899a2dd95SBruce Richardson 5999a2dd95SBruce Richardson #ifdef __cplusplus 6099a2dd95SBruce Richardson } 6199a2dd95SBruce Richardson #endif 6299a2dd95SBruce Richardson 6399a2dd95SBruce Richardson #endif /* _RTE_REGEXDEV_DRIVER_H_ */ 64