Intel EP80579 Security Camera User Manual


 
Intel
®
EP80579 Software for Security Applications on Intel
®
QuickAssist Technology
August 2009 PG
Order Number: 320183-004US 65
Using the Intel
®
QuickAssist Technology Cryptographic API—Security Software
12.4.2 Buffer List
The Cryptographic API uses a scatter gather buffer list structure. This buffer structure
is typically used where more than one flat buffer can be provided on an particular API.
A Buffer List is defined by the type CpaBufferList, defined in cpa.h. Figure 21 is a
graphical representation of a buffer list. The buffer list contains four parameters: the
number of buffers in the list, a pointer to an unbounded array of flat buffers, user data
and a pointer to meta data required by the API, pMetaData.
The user data is an opaque field and is not read or modified internally by the API. The
meta data is required for internal use by the API and the memory for this buffer needs
to be allocated by the client as contiguous data. The size of this meta data buffer is
obtained by calling a BufferListGetMetaSize function.
Sample routines for converting between Linux sk_buff structures and CpaBufferList are
provided in the OCF shim code, see [OCF_CODE] for details.
12.5 Memory Management
Certain per packet data, such as the Initialization Vector (IV), may be copied depending
on whether it is 8-byte aligned or not. This will have an impact on performance. This
puts responsibility on the user of the API to be aware of the optimal data alignment for
the API they are using. Also the user needs to make sure that the data is available in
memory while the Security Services Unit is using it (that is until the callback is
invoked).
Figure 20. Flat Buffer Diagram
Buffer
LenInBytes
pData
Figure 21. Buffer List Diagram
Buffer 1
# Buffers
pBuffers
UserData
pMetaData
LenInBytes
0
pData
0
LenInBytes
1
pData
1
User must also allocate this data