f-stack/dpdk/drivers/crypto/qat/qat_sym_pmd.h

54 lines
1.4 KiB
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2015-2018 Intel Corporation
*/
#ifndef _QAT_SYM_PMD_H_
#define _QAT_SYM_PMD_H_
#ifdef BUILD_QAT_SYM
2021-02-05 08:48:47 +00:00
#include <rte_ether.h>
2019-06-25 11:12:58 +00:00
#include <rte_cryptodev.h>
2021-02-05 08:48:47 +00:00
#ifdef RTE_LIB_SECURITY
#include <rte_security.h>
#endif
2019-06-25 11:12:58 +00:00
#include "qat_sym_capabilities.h"
#include "qat_device.h"
2022-09-02 04:40:05 +00:00
/** Intel(R) QAT Symmetric Crypto PMD name */
2019-06-25 11:12:58 +00:00
#define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat
2021-01-28 17:08:59 +00:00
/* Internal capabilities */
#define QAT_SYM_CAP_MIXED_CRYPTO (1 << 0)
#define QAT_SYM_CAP_VALID (1 << 31)
extern uint8_t qat_sym_driver_id;
2019-06-25 11:12:58 +00:00
/** private data structure for a QAT device.
* This QAT device is a device offering only symmetric crypto service,
2020-06-18 16:55:50 +00:00
* there can be one of these on each qat_pci_device (VF).
2019-06-25 11:12:58 +00:00
*/
struct qat_sym_dev_private {
struct qat_pci_device *qat_dev;
/**< The qat pci device hosting the service */
uint8_t sym_dev_id;
/**< Device instance for this rte_cryptodev */
const struct rte_cryptodev_capabilities *qat_dev_capabilities;
2021-02-05 08:48:47 +00:00
/* QAT device symmetric crypto capabilities */
2021-01-28 17:08:59 +00:00
const struct rte_memzone *capa_mz;
/* Shared memzone for storing capabilities */
uint16_t min_enq_burst_threshold;
2021-02-05 08:48:47 +00:00
uint32_t internal_capabilities; /* see flags QAT_SYM_CAP_xxx */
2019-06-25 11:12:58 +00:00
};
int
2021-01-28 17:08:59 +00:00
qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
struct qat_dev_cmd_param *qat_dev_cmd_param);
2019-06-25 11:12:58 +00:00
int
qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev);
#endif
#endif /* _QAT_SYM_PMD_H_ */