1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2015-2018 Intel Corporation 3 */ 4 5 #ifndef _QAT_COMP_PMD_H_ 6 #define _QAT_COMP_PMD_H_ 7 8 #ifdef RTE_LIB_COMPRESSDEV 9 10 #include <rte_compressdev.h> 11 #include <rte_compressdev_pmd.h> 12 13 #include "qat_device.h" 14 15 /**< Intel(R) QAT Compression PMD driver name */ 16 #define COMPRESSDEV_NAME_QAT_PMD compress_qat 17 18 /** private data structure for a QAT compression device. 19 * This QAT device is a device offering only a compression service, 20 * there can be one of these on each qat_pci_device (VF). 21 */ 22 struct qat_comp_dev_private { 23 struct qat_pci_device *qat_dev; 24 /**< The qat pci device hosting the service */ 25 struct rte_compressdev *compressdev; 26 /**< The pointer to this compression device structure */ 27 const struct rte_compressdev_capabilities *qat_dev_capabilities; 28 /* QAT device compression capabilities */ 29 const struct rte_memzone *interm_buff_mz; 30 /**< The device's memory for intermediate buffers */ 31 struct rte_mempool *xformpool; 32 /**< The device's pool for qat_comp_xforms */ 33 struct rte_mempool *streampool; 34 /**< The device's pool for qat_comp_streams */ 35 const struct rte_memzone *capa_mz; 36 /* Shared memzone for storing capabilities */ 37 uint16_t min_enq_burst_threshold; 38 }; 39 40 int 41 qat_comp_dev_create(struct qat_pci_device *qat_pci_dev, 42 struct qat_dev_cmd_param *qat_dev_cmd_param); 43 44 int 45 qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev); 46 47 #endif 48 #endif /* _QAT_COMP_PMD_H_ */ 49