1 /**************************************************************************** 2 * 3 * BSD LICENSE 4 * 5 * Copyright(c) 2007-2023 Intel Corporation. All rights reserved. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * * Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in 16 * the documentation and/or other materials provided with the 17 * distribution. 18 * * Neither the name of Intel Corporation nor the names of its 19 * contributors may be used to endorse or promote products derived 20 * from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * 34 * 35 ***************************************************************************/ 36 37 /* 38 ***************************************************************************** 39 * Doxygen group definitions 40 ****************************************************************************/ 41 42 /** 43 ***************************************************************************** 44 * @file cpa_dc_chain.h 45 * 46 * @defgroup cpaDcChain Data Compression Chaining API 47 * 48 * @ingroup cpaDc 49 * 50 * @description 51 * These functions specify the API for Data Compression Chaining operations. 52 * 53 * @remarks 54 * 55 * 56 *****************************************************************************/ 57 58 #ifndef CPA_DC_CHAIN_H 59 #define CPA_DC_CHAIN_H 60 61 #ifdef __cplusplus 62 extern"C" { 63 #endif 64 65 #include "cpa_dc.h" 66 #include "cpa_cy_sym.h" 67 68 69 /** 70 ***************************************************************************** 71 * @ingroup cpaDcChain 72 * Supported operations for compression chaining 73 * 74 * @description 75 * This enumeration lists the supported operations for compression chaining 76 * 77 *****************************************************************************/ 78 typedef enum _CpaDcChainOperations 79 { 80 CPA_DC_CHAIN_COMPRESS_THEN_HASH, 81 /**< 2 operations for chaining: 82 * 1st operation is to perform compression on plain text 83 * 2nd operation is to perform hash on compressed text 84 **< 2 entries in CpaDcChainSessionSetupData array: 85 * 1st entry is for compression setup data 86 * 2nd entry is for hash setup data*/ 87 CPA_DC_CHAIN_COMPRESS_THEN_ENCRYPT, 88 /**< 2 operations for chaining: 89 * 1st operation is to perform compression on plain text 90 * 2nd operation is to perform encryption on compressed text 91 **< 2 entries in CpaDcChainSessionSetupData array: 92 * 1st entry is for compression setup data 93 * 2nd entry is for encryption setup data*/ 94 CPA_DC_CHAIN_COMPRESS_THEN_HASH_ENCRYPT, 95 /**< 2 operations for chaining: 96 * 1st operation is to perform compression on plain text 97 * 2nd operation is to perform hash on compressed text and 98 * encryption on compressed text 99 **< 2 entries in CpaDcChainSessionSetupData array: 100 * 1st entry is for compression setup data 101 * 2nd entry is for hash and encryption setup data*/ 102 CPA_DC_CHAIN_COMPRESS_THEN_ENCRYPT_HASH, 103 /**< 2 operations for chaining: 104 * 1st operation is to perform compression on plain text 105 * 2nd operation is to perform encryption on compressed text and 106 * hash on compressed & encrypted text 107 **< 2 entries in CpaDcChainSessionSetupData array: 108 * 1st entry is for compression setup data 109 * 2nd entry is for encryption and hash setup data*/ 110 CPA_DC_CHAIN_COMPRESS_THEN_AEAD, 111 /**< 2 operations for chaining: 112 * 1st operation is to perform compression on plain text 113 * 2nd operation is to perform AEAD encryption on compressed text 114 **< 2 entries in CpaDcChainSessionSetupData array: 115 * 1st entry is for compression setup data 116 * 2nd entry is for AEAD encryption setup data*/ 117 CPA_DC_CHAIN_HASH_THEN_COMPRESS, 118 /**< 2 operations for chaining: 119 * 1st operation is to perform hash on plain text 120 * 2nd operation is to perform compression on plain text 121 **< 2 entries in CpaDcChainSessionSetupData array: 122 * 1st entry is for hash setup data 123 * 2nd entry is for compression setup data*/ 124 CPA_DC_CHAIN_HASH_VERIFY_THEN_DECOMPRESS, 125 /**< 2 operations for chaining: 126 * 1st operation is to perform hash verify on compressed text 127 * 2nd operation is to perform decompression on compressed text 128 **< 2 entries in CpaDcChainSessionSetupData array: 129 * 1st entry is for hash setup data 130 * 2nd entry is for decompression setup data*/ 131 CPA_DC_CHAIN_DECRYPT_THEN_DECOMPRESS, 132 /**< 2 operations for chaining: 133 * 1st operation is to perform decryption on compressed & encrypted text 134 * 2nd operation is to perform decompression on compressed text 135 **< 2 entries in CpaDcChainSessionSetupData array: 136 * 1st entry is for decryption setup data 137 * 2nd entry is for decompression setup data*/ 138 CPA_DC_CHAIN_HASH_VERIFY_DECRYPT_THEN_DECOMPRESS, 139 /**< 2 operations for chaining: 140 * 1st operation is to perform hash verify on compressed & encrypted text 141 * and decryption on compressed & encrypted text 142 * 2nd operation is to perform decompression on compressed text 143 **< 2 entries in CpaDcChainSessionSetupData array: 144 * 1st entry is for hash and decryption setup data 145 * 2nd entry is for decompression setup data*/ 146 CPA_DC_CHAIN_DECRYPT_HASH_VERIFY_THEN_DECOMPRESS, 147 /**< 2 operations for chaining: 148 * 1st operation is to perform decryption on compressed & encrypted text 149 * and hash verify on compressed text 150 * 2nd operation is to perform decompression on compressed text 151 **< 2 entries in CpaDcChainSessionSetupData array: 152 * 1st entry is for decryption and hash setup data 153 * 2nd entry is for decompression setup data*/ 154 CPA_DC_CHAIN_AEAD_THEN_DECOMPRESS, 155 /**< 2 operations for chaining: 156 * 1st operation is to perform AEAD decryption on compressed & encrypted text 157 * 2nd operation is to perform decompression on compressed text 158 **< 2 entries in CpaDcChainSessionSetupData array: 159 * 1st entry is for AEAD decryption setup data 160 * 2nd entry is for decompression setup data*/ 161 CPA_DC_CHAIN_DECOMPRESS_THEN_HASH_VERIFY, 162 /**< 2 operations for chaining: 163 * 1st operation is to perform decompression on compressed text 164 * 2nd operation is to perform hash verify on plain text 165 **< 2 entries in CpaDcChainSessionSetupData array: 166 * 1st entry is for decompression setup data 167 * 2nd entry is for hash setup data*/ 168 CPA_DC_CHAIN_COMPRESS_THEN_AEAD_THEN_HASH, 169 /**< 3 operations for chaining: 170 * 1st operation is to perform compression on plain text 171 * 2nd operation is to perform AEAD encryption compressed text 172 * 3rd operation is to perfom hash on compressed & encrypted text 173 **< 3 entries in CpaDcChainSessionSetupData array: 174 * 1st entry is for compression setup data 175 * 2nd entry is for AEAD encryption setup data 176 * 3rd entry is for hash setup data*/ 177 } CpaDcChainOperations; 178 179 /** 180 ***************************************************************************** 181 * @ingroup cpaDcChain 182 * Supported session types for data compression chaining. 183 * 184 * @description 185 * This enumeration lists the supported session types 186 * for data compression chaining. 187 *****************************************************************************/ 188 typedef enum _CpaDcChainSessionType 189 { 190 CPA_DC_CHAIN_COMPRESS_DECOMPRESS, 191 /**< Indicate the session is for compression or decompression */ 192 CPA_DC_CHAIN_SYMMETRIC_CRYPTO, 193 /**< Indicate the session is for symmetric crypto */ 194 } CpaDcChainSessionType; 195 196 /** 197 ***************************************************************************** 198 * @ingroup cpaDcChain 199 * Chaining Session Setup Data. 200 * @description 201 * This structure contains data relating to set up chaining sessions. The 202 * client needs to complete the information in this structure in order to 203 * setup chaining sessions. 204 * 205 ****************************************************************************/ 206 typedef struct _CpaDcChainSessionSetupData { 207 CpaDcChainSessionType sessType; 208 /**Indicate the type for this session */ 209 union { 210 CpaDcSessionSetupData *pDcSetupData; 211 /**< Pointer to compression session setup data */ 212 CpaCySymSessionSetupData *pCySetupData; 213 /**< Pointer to symmectric crypto session setup data */ 214 }; 215 } CpaDcChainSessionSetupData; 216 217 /** 218 ***************************************************************************** 219 * @ingroup cpaDcChain 220 * Compression chaining request input parameters. 221 * @description 222 * This structure contains the request information to use with 223 * compression chaining operations. 224 * 225 ****************************************************************************/ 226 typedef struct _CpaDcChainOpData { 227 CpaDcChainSessionType opType; 228 /**< Indicate the type for this operation */ 229 union { 230 CpaDcOpData *pDcOp; 231 /**< Pointer to compression operation data */ 232 CpaCySymOpData *pCySymOp; 233 /**< Pointer to symmectric crypto operation data */ 234 }; 235 } CpaDcChainOpData; 236 237 /** 238 ***************************************************************************** 239 * @ingroup cpaDcChain 240 * Chaining request results data 241 * @description 242 * This structure contains the request results. 243 * 244 ****************************************************************************/ 245 typedef struct _CpaDcChainRqResults { 246 CpaDcReqStatus dcStatus; 247 /**< Additional status details from compression accelerator */ 248 CpaStatus cyStatus; 249 /**< Additional status details from symmetric crypto accelerator */ 250 CpaBoolean verifyResult; 251 /**< This parameter is valid when the verifyDigest option is set in the 252 * CpaCySymSessionSetupData structure. A value of CPA_TRUE indicates 253 * that the compare succeeded. A value of CPA_FALSE indicates that the 254 * compare failed */ 255 Cpa32U produced; 256 /**< Octets produced to the output buffer */ 257 Cpa32U consumed; 258 /**< Octets consumed from the input buffer */ 259 Cpa32U crc32; 260 /**< crc32 checksum produced by chaining operations */ 261 Cpa32U adler32; 262 /**< adler32 checksum produced by chaining operations */ 263 }CpaDcChainRqResults; 264 265 /** 266 ***************************************************************************** 267 * @ingroup cpaDcChain 268 * Get the size of the memory required to hold the chaining sessions 269 * information. 270 * 271 * @description 272 * The client of the Data Compression API is responsible for 273 * allocating sufficient memory to hold chaining sessions information. 274 * This function provides a way for determining the size of chaining 275 * sessions. 276 * 277 * @context 278 * No restrictions 279 * @assumptions 280 * None 281 * @sideEffects 282 * None 283 * @blocking 284 * No 285 * @reentrant 286 * No 287 * @threadSafe 288 * Yes 289 * 290 * @param[in] dcInstance Instance handle. 291 * @param[in] operation The operation for chaining 292 * @param[in] numSessions Number of sessions for the chaining 293 * @param[in] pSessionData Pointer to an array of 294 * CpaDcChainSessionSetupData structures. 295 * There should be numSessions entries in 296 * the array. 297 * @param[out] pSessionSize On return, this parameter will be the size 298 * of the memory that will be required by 299 * cpaDcChainInitSession() for session data. 300 * 301 * @retval CPA_STATUS_SUCCESS Function executed successfully. 302 * @retval CPA_STATUS_FAIL Function failed. 303 * @retval CPA_STATUS_INVALID_PARAM Invalid parameter passed in. 304 * @retval CPA_STATUS_UNSUPPORTED Function is not supported. 305 * 306 * @pre 307 * None 308 * @post 309 * None 310 * @note 311 * Only a synchronous version of this function is provided. 312 * 313 * @see 314 * cpaDcChainInitSession() 315 * 316 *****************************************************************************/ 317 CpaStatus 318 cpaDcChainGetSessionSize(CpaInstanceHandle dcInstance, 319 CpaDcChainOperations operation, 320 Cpa8U numSessions, 321 CpaDcChainSessionSetupData *pSessionData, 322 Cpa32U* pSessionSize); 323 324 /** 325 ***************************************************************************** 326 * @ingroup cpaDcChain 327 * Initialize data compression chaining session 328 * 329 * @description 330 * This function is used to initialize compression/decompression chaining 331 * sessions. 332 * This function returns a unique session handle each time this function 333 * is invoked. 334 * If the session has been configured with a callback function, then 335 * the order of the callbacks are guaranteed to be in the same order the 336 * compression or decompression requests were submitted for each session, 337 * so long as a single thread of execution is used for job submission. 338 * 339 * @context 340 * This is a synchronous function and it cannot sleep. It can be executed 341 * in a context that does not permit sleeping. 342 * @assumptions 343 * None 344 * @sideEffects 345 * None 346 * @blocking 347 * No 348 * @reentrant 349 * No 350 * @threadSafe 351 * Yes 352 * 353 * @param[in] dcInstance Instance handle derived from discovery 354 * functions. 355 * @param[in,out] pSessionHandle Pointer to a session handle. 356 * @param[in] operation The operations for chaining 357 * @param[in] numSessions Number of sessions for chaining 358 * @param[in,out] pSessionData Pointer to an array of 359 * CpaDcChainSessionSetupData structures. 360 * There should be numSessions entries in 361 * the array. 362 * @param[in] callbackFn For synchronous operation this callback 363 * shall be a null pointer. 364 * 365 * @retval CPA_STATUS_SUCCESS Function executed successfully. 366 * @retval CPA_STATUS_FAIL Function failed. 367 * @retval CPA_STATUS_INVALID_PARAM Invalid parameter passed in. 368 * @retval CPA_STATUS_RESOURCE Error related to system resources. 369 * @retval CPA_STATUS_RESTARTING API implementation is restarting. Resubmit 370 * the request. 371 * @retval CPA_STATUS_UNSUPPORTED Function is not supported. 372 * 373 * @pre 374 * dcInstance has been started using cpaDcStartInstance. 375 * @post 376 * None 377 * @note 378 * Only a synchronous version of this function is provided. 379 * 380 * pSessionData Setup Rules 381 * -# Each element in CpaDcChainSessionSetupData structure array provides 382 * (de)compression or a symmetric crypto session setup data. 383 * 384 * -# The supported chaining operations are listed in CpaDcChainOperations. 385 * This enum indicates the number of operations in a chain and the order 386 * in which they are performed. 387 * 388 * -# The order of entries in pSessionData[] should be consistent with the 389 * CpaDcChainOperations perform order. 390 * As an example, for CPA_DC_CHAIN_COMPRESS_THEN_ENCRYPT, pSessionData[0] 391 * holds the compression setup data and pSessionData[1] holds the 392 * encryption setup data.. 393 * 394 * -# The numSessions for each chaining operation are provided in 395 * the comments of enum CpaDcChainOperations. 396 * 397 * -# For a (de)compression session, the corresponding 398 * pSessionData[]->sessType should be set to 399 * CPA_DC_CHAIN_COMPRESS_DECOMPRESS and pSessionData[]->pDcSetupData 400 * should point to a CpaDcSessionSetupData structure. 401 * 402 * -# For a symmetric crypto session, the corresponding 403 * pSessionData[]->sessType should be set to CPA_DC_CHAIN_SYMMETRIC_CRYPTO 404 * and pSessionData[]->pCySetupData should point to a 405 * CpaCySymSessionSetupData structure. 406 * 407 * -# Combined compression sessions are not supported for chaining. 408 * 409 * -# Stateful compression is not supported for chaining. 410 * 411 * -# Both CRC32 and Adler32 over the input data are supported for chaining. 412 * 413 * @see 414 * None 415 * 416 *****************************************************************************/ 417 CpaStatus 418 cpaDcChainInitSession(CpaInstanceHandle dcInstance, 419 CpaDcSessionHandle pSessionHandle, 420 CpaDcChainOperations operation, 421 Cpa8U numSessions, 422 CpaDcChainSessionSetupData *pSessionData, 423 CpaDcCallbackFn callbackFn); 424 425 /** 426 ***************************************************************************** 427 * @ingroup cpaDcChain 428 * Reset a compression chaining session. 429 * 430 * @description 431 * This function will reset a previously initialized session handle. 432 * Reset will fail if outstanding calls still exist for the initialized 433 * session handle. 434 * The client needs to retry the reset function at a later time. 435 * 436 * @context 437 * This is a synchronous function that cannot sleep. It can be 438 * executed in a context that does not permit sleeping. 439 * @assumptions 440 * None 441 * @sideEffects 442 * None 443 * @blocking 444 * No. 445 * @reentrant 446 * No 447 * @threadSafe 448 * Yes 449 * 450 * @param[in] dcInstance Instance handle. 451 * @param[in,out] pSessionHandle Session handle. 452 * 453 * @retval CPA_STATUS_SUCCESS Function executed successfully. 454 * @retval CPA_STATUS_FAIL Function failed. 455 * @retval CPA_STATUS_RETRY Resubmit the request. 456 * @retval CPA_STATUS_INVALID_PARAM Invalid parameter passed in. 457 * @retval CPA_STATUS_UNSUPPORTED Function is not supported. 458 * 459 * @pre 460 * The component has been initialized via cpaDcStartInstance function. 461 * The session has been initialized via cpaDcChainInitSession function. 462 * @post 463 * None 464 * @note 465 * This is a synchronous function and has no completion callback 466 * associated with it. 467 * 468 * @see 469 * cpaDcChainInitSession() 470 * 471 *****************************************************************************/ 472 CpaStatus 473 cpaDcChainResetSession(const CpaInstanceHandle dcInstance, 474 CpaDcSessionHandle pSessionHandle); 475 476 477 /** 478 ***************************************************************************** 479 * @ingroup cpaDcChain 480 * Remove a compression chaining session. 481 * 482 * @description 483 * This function will remove a previously initialized session handle 484 * and the installed callback handler function. Removal will fail if 485 * outstanding calls still exist for the initialized session handle. 486 * The client needs to retry the remove function at a later time. 487 * The memory for the session handle MUST not be freed until this call 488 * has completed successfully. 489 * 490 * @context 491 * This is a synchronous function that cannot sleep. It can be executed 492 * in a context that does not permit sleeping. 493 * @assumptions 494 * None 495 * @sideEffects 496 * None 497 * @blocking 498 * No. 499 * @reentrant 500 * No 501 * @threadSafe 502 * Yes 503 * 504 * @param[in] dcInstance Instance handle. 505 * @param[in,out] pSessionHandle Session handle. 506 * 507 * @retval CPA_STATUS_SUCCESS Function executed successfully. 508 * @retval CPA_STATUS_FAIL Function failed. 509 * @retval CPA_STATUS_RETRY Resubmit the request. 510 * @retval CPA_STATUS_INVALID_PARAM Invalid parameter passed in. 511 * @retval CPA_STATUS_RESOURCE Error related to system resources. 512 * @retval CPA_STATUS_RESTARTING API implementation is restarting. Resubmit 513 * the request. 514 * @retval CPA_STATUS_UNSUPPORTED Function is not supported. 515 * 516 * @pre 517 * The component has been initialized via cpaDcStartInstance function. 518 * @post 519 * None 520 * @note 521 * This is a synchronous function and has no completion callback 522 * associated with it. 523 * 524 * @see 525 * cpaDcChainInitSession() 526 * 527 *****************************************************************************/ 528 CpaStatus 529 cpaDcChainRemoveSession(const CpaInstanceHandle dcInstance, 530 CpaDcSessionHandle pSessionHandle); 531 532 /** 533 ***************************************************************************** 534 * @ingroup cpaDcChain 535 * Submit a request to perform chaining operations. 536 * 537 * @description 538 * This function is used to perform chaining operations over data from 539 * the source buffer. 540 * 541 * @context 542 * When called as an asynchronous function it cannot sleep. It can be 543 * executed in a context that does not permit sleeping. 544 * When called as a synchronous function it may sleep. It MUST NOT be 545 * executed in a context that DOES NOT permit sleeping. 546 * @assumptions 547 * None 548 * @sideEffects 549 * None 550 * @blocking 551 * Yes when configured to operate in synchronous mode. 552 * @reentrant 553 * No 554 * @threadSafe 555 * Yes 556 * 557 * @param[in] dcInstance Target service instance. 558 * @param[in,out] pSessionHandle Session handle. 559 * @param[in] pSrcBuff Pointer to input data buffer. 560 * @param[out] pDestBuff Pointer to output data buffer. 561 * @param[in] operation Operation for the chaining request 562 * @param[in] numOpDatas The entries size CpaDcChainOpData array 563 * @param[in] pChainOpData Pointer to an array of CpaDcChainOpData 564 * structures. There should be numOpDatas 565 * entries in the array. 566 * @param[in,out] pResults Pointer to CpaDcChainRqResults structure. 567 * @param[in] callbackTag User supplied value to help correlate 568 * the callback with its associated request. 569 * 570 * @retval CPA_STATUS_SUCCESS Function executed successfully. 571 * @retval CPA_STATUS_FAIL Function failed. 572 * @retval CPA_STATUS_RETRY Resubmit the request. 573 * @retval CPA_STATUS_INVALID_PARAM Invalid parameter passed in. 574 * @retval CPA_STATUS_RESOURCE Error related to system resources. 575 * @retval CPA_DC_BAD_DATA The input data was not properly formed. 576 * @retval CPA_STATUS_RESTARTING API implementation is restarting. Resubmit 577 * the request. 578 * @retval CPA_STATUS_UNSUPPORTED Function is not supported. 579 * 580 * @pre 581 * pSessionHandle has been setup using cpaDcChainInitSession() 582 * @post 583 * pSessionHandle has session related state information 584 * @note 585 * This function passes control to the compression service for chaining 586 * processing, the supported chaining operations are described in 587 * CpaDcChainOperations. 588 * 589 * pChainOpData Setup Rules 590 * -# Each element in CpaDcChainOpData structure array holds either a 591 * (de)compression or a symmetric crypto operation data. 592 * 593 * -# The order of entries in pChainOpData[] must be consistent with the 594 * order of operations described for the chaining operation in 595 * CpaDcChainOperations. 596 * As an example, for CPA_DC_CHAIN_COMPRESS_THEN_ENCRYPT, pChainOpData[0] 597 * must contain the compression operation data and pChainOpData[1] must 598 * contain the encryption operation data. 599 * 600 * -# The numOpDatas for each chaining operation are specified in the 601 * comments for the operation in CpaDcChainOperations. 602 * 603 * -# For a (de)compression operation, the corresponding 604 * pChainOpData[]->opType should be set to 605 * CPA_DC_CHAIN_COMPRESS_DECOMPRESS and pChainOpData[]->pDcOp should 606 * point to a CpaDcOpData structure. 607 * 608 * -# For a symmetric crypto operation, the corresponding 609 * pChainOpData[]->opType should be set to 610 * CPA_DC_CHAIN_SYMMETRIC_CRYPTO and pChainOpData[]->pCySymOp should 611 * point to a CpaCySymOpData structure. 612 * 613 * -# Stateful compression is not supported for chaining. 614 * 615 * -# Partial packet processing is not supported. 616 * 617 * This function has identical buffer processing rules as 618 * cpaDcCompressData(). 619 * 620 * This function has identical checksum processing rules as 621 * cpaDcCompressData(), except: 622 * -# pResults->crc32 is available to application if 623 * CpaDcSessionSetupData->checksum is set to CPA_DC_CRC32 624 * 625 * -# pResults->adler32 is available to application if 626 * CpaDcSessionSetupData->checksum is set to CPA_DC_ADLER32 627 * 628 * -# Both pResults->crc32 and pResults->adler32 are available if 629 * CpaDcSessionSetupData->checksum is set to CPA_DC_CRC32_ADLER32 630 * 631 * Synchronous or asynchronous operation of the API is determined by 632 * the value of the callbackFn parameter passed to cpaDcChainInitSession() 633 * when the sessionHandle was setup. If a non-NULL value was specified 634 * then the supplied callback function will be invoked asynchronously 635 * with the response of this request. 636 * 637 * This function has identical response ordering rules as 638 * cpaDcCompressData(). 639 * 640 * @see 641 * cpaDcCompressData 642 * 643 *****************************************************************************/ 644 CpaStatus 645 cpaDcChainPerformOp(CpaInstanceHandle dcInstance, 646 CpaDcSessionHandle pSessionHandle, 647 CpaBufferList *pSrcBuff, 648 CpaBufferList *pDestBuff, 649 CpaDcChainOperations operation, 650 Cpa8U numOpDatas, 651 CpaDcChainOpData *pChainOpData, 652 CpaDcChainRqResults *pResults, 653 void *callbackTag ); 654 655 #ifdef __cplusplus 656 } /* close the extern "C" { */ 657 #endif 658 659 #endif /* CPA_DC_CHAIN_H */ 660