1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* Copyright(c) 2007-2022 Intel Corporation */ 3 /** 4 ***************************************************************************** 5 * @file icp_buffer_desc.h 6 * 7 * @defgroup icp_BufferDesc Buffer descriptor for LAC 8 * 9 * @ingroup LacCommon 10 * 11 * @description 12 * This file contains details of the hardware buffer descriptors used to 13 * communicate with the QAT. 14 * 15 *****************************************************************************/ 16 #ifndef ICP_BUFFER_DESC_H 17 #define ICP_BUFFER_DESC_H 18 19 #include "cpa.h" 20 21 typedef Cpa64U icp_qat_addr_width_t; // hi32 first, lo32 second 22 23 // Alignement constraint of the buffer list. 24 #define ICP_DESCRIPTOR_ALIGNMENT_BYTES 8 25 26 /** 27 ***************************************************************************** 28 * @ingroup icp_BufferDesc 29 * Buffer descriptors for FlatBuffers - used in communications with 30 * the QAT. 31 * 32 * @description 33 * A QAT friendly buffer descriptor. 34 * All buffer descriptor described in this structure are physcial 35 * and are 64 bit wide. 36 * 37 * Updates in the CpaFlatBuffer should be also reflected in this 38 * structure 39 * 40 *****************************************************************************/ 41 typedef struct icp_flat_buffer_desc_s { 42 Cpa32U dataLenInBytes; 43 Cpa32U reserved; 44 icp_qat_addr_width_t phyBuffer; 45 /**< The client will allocate memory for this using API function calls 46 * and the access layer will fill it and the QAT will read it. 47 */ 48 } icp_flat_buffer_desc_t; 49 50 /** 51 ***************************************************************************** 52 * @ingroup icp_BufferDesc 53 * Buffer descriptors for BuffersLists - used in communications with 54 * the QAT. 55 * 56 * @description 57 * A QAT friendly buffer descriptor. 58 * All buffer descriptor described in this structure are physcial 59 * and are 64 bit wide. 60 * 61 * Updates in the CpaBufferList should be also reflected in this structure 62 * 63 *****************************************************************************/ 64 typedef struct icp_buffer_list_desc_s { 65 Cpa64U resrvd; 66 Cpa32U numBuffers; 67 Cpa32U reserved; 68 icp_flat_buffer_desc_t phyBuffers[]; 69 /**< Unbounded array of physical buffer pointers, these point to the 70 * FlatBufferDescs. The client will allocate memory for this using 71 * API function calls and the access layer will fill it and the QAT 72 * will read it. 73 */ 74 } icp_buffer_list_desc_t; 75 76 #endif /* ICP_BUFFER_DESC_H */ 77