numam-dpdk/lib/librte_regexdev/rte_regexdev_driver.h
Ori Kam b25246beae regexdev: add core functions
This commit introduce the API that is needed by the RegEx devices in
order to work with the RegEX lib.

During the probe of a RegEx device, the device should configure itself,
and allocate the resources it requires.
On completion of the device init, it should call the
rte_regex_dev_register in order to register itself as a RegEx device.

Signed-off-by: Ori Kam <orika@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Acked-by: Guy Kaneti <guyk@marvell.com>
2020-07-07 00:24:51 +02:00

60 lines
1.1 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2020 Mellanox Technologies, Ltd
*/
#ifndef _RTE_REGEXDEV_DRIVER_H_
#define _RTE_REGEXDEV_DRIVER_H_
/**
* @file
*
* RTE RegEx Device PMD API
*
* APIs that are used by the RegEx drivers, to communicate with the
* RegEx lib.
*/
#include "rte_regexdev.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @internal
* Register a RegEx device slot for a RegEx device and return the
* pointer to that slot.
*
* @param name
* RegEx device name.
*
* @return
* A pointer to the RegEx device slot case of success,
* NULL otherwise.
*/
struct rte_regexdev *rte_regexdev_register(const char *name);
/**
* @internal
* Unregister the specified regexdev port.
*
* @param dev
* Device to be released.
*/
void rte_regexdev_unregister(struct rte_regexdev *dev);
/**
* @internal
* Return the RegEx device based on the device name.
*
* @param name
* The device name.
*/
struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name);
#ifdef __cplusplus
}
#endif
#endif /* _RTE_REGEXDEV_DRIVER_H_ */