mirror of
https://github.com/opnsense/src.git
synced 2026-02-27 03:40:37 -05:00
QAT in-tree driver ported from out-of-tree release available from 01.org. The driver exposes complete cryptography and data compression API in the kernel and integrates with Open Crypto Framework. Details of supported operations, devices and usage can be found in man and on 01.org. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Jaraczewski <michalx.jaraczewski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Adam Czupryna <adamx.czupryna@intel.com> Patch co-authored by: Konrad Zelazny <konradx.zelazny@intel.com> Patch co-authored by: Katarzyna Rucinska <katarzynax.kargol@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Zbigniew Jedlinski <zbigniewx.jedlinski@intel.com> Reviewed by: markj, jhb (OCF integration) Reviewed by: debdrup, pauamma (docs) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D34632
77 lines
2.5 KiB
C
77 lines
2.5 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
/* Copyright(c) 2007-2022 Intel Corporation */
|
|
/* $FreeBSD$ */
|
|
/**
|
|
*****************************************************************************
|
|
* @file icp_buffer_desc.h
|
|
*
|
|
* @defgroup icp_BufferDesc Buffer descriptor for LAC
|
|
*
|
|
* @ingroup LacCommon
|
|
*
|
|
* @description
|
|
* This file contains details of the hardware buffer descriptors used to
|
|
* communicate with the QAT.
|
|
*
|
|
*****************************************************************************/
|
|
#ifndef ICP_BUFFER_DESC_H
|
|
#define ICP_BUFFER_DESC_H
|
|
|
|
#include "cpa.h"
|
|
|
|
typedef Cpa64U icp_qat_addr_width_t; // hi32 first, lo32 second
|
|
|
|
// Alignement constraint of the buffer list.
|
|
#define ICP_DESCRIPTOR_ALIGNMENT_BYTES 8
|
|
|
|
/**
|
|
*****************************************************************************
|
|
* @ingroup icp_BufferDesc
|
|
* Buffer descriptors for FlatBuffers - used in communications with
|
|
* the QAT.
|
|
*
|
|
* @description
|
|
* A QAT friendly buffer descriptor.
|
|
* All buffer descriptor described in this structure are physcial
|
|
* and are 64 bit wide.
|
|
*
|
|
* Updates in the CpaFlatBuffer should be also reflected in this
|
|
* structure
|
|
*
|
|
*****************************************************************************/
|
|
typedef struct icp_flat_buffer_desc_s {
|
|
Cpa32U dataLenInBytes;
|
|
Cpa32U reserved;
|
|
icp_qat_addr_width_t phyBuffer;
|
|
/**< The client will allocate memory for this using API function calls
|
|
* and the access layer will fill it and the QAT will read it.
|
|
*/
|
|
} icp_flat_buffer_desc_t;
|
|
|
|
/**
|
|
*****************************************************************************
|
|
* @ingroup icp_BufferDesc
|
|
* Buffer descriptors for BuffersLists - used in communications with
|
|
* the QAT.
|
|
*
|
|
* @description
|
|
* A QAT friendly buffer descriptor.
|
|
* All buffer descriptor described in this structure are physcial
|
|
* and are 64 bit wide.
|
|
*
|
|
* Updates in the CpaBufferList should be also reflected in this structure
|
|
*
|
|
*****************************************************************************/
|
|
typedef struct icp_buffer_list_desc_s {
|
|
Cpa64U resrvd;
|
|
Cpa32U numBuffers;
|
|
Cpa32U reserved;
|
|
icp_flat_buffer_desc_t phyBuffers[];
|
|
/**< Unbounded array of physical buffer pointers, these point to the
|
|
* FlatBufferDescs. The client will allocate memory for this using
|
|
* API function calls and the access layer will fill it and the QAT
|
|
* will read it.
|
|
*/
|
|
} icp_buffer_list_desc_t;
|
|
|
|
#endif /* ICP_BUFFER_DESC_H */
|