1/* SPDX-License-Identifier: BSD-3-Clause */
2/* Copyright(c) 2007-2022 Intel Corporation */
3
4/**
5 ******************************************************************************
6 * @file lac_sym_queue.h
7 *
8 * @defgroup LacSymQueue Symmetric request queueing functions
9 *
10 * @ingroup LacSym
11 *
12 * Function prototypes for sending/queuing symmetric requests
13 *****************************************************************************/
14
15#ifndef LAC_SYM_QUEUE_H
16#define LAC_SYM_QUEUE_H
17
18#include "cpa.h"
19#include "lac_session.h"
20#include "lac_sym.h"
21
22/**
23*******************************************************************************
24* @ingroup LacSymQueue
25*      Send a request message to the QAT, or queue it if necessary
26*
27* @description
28*      This function will send a request message to the QAT.  However, if a
29*      blocking condition exists on the session (e.g. partial packet in flight,
30*      precompute in progress), then the message will instead be pushed on to
31*      the request queue for the session and will be sent later to the QAT
32*      once the blocking condition is cleared.
33*
34* @param[in]  instanceHandle       Handle for instance of QAT
35* @param[in]  pRequest             Pointer to request cookie
36* @param[out] pSessionDesc         Pointer to session descriptor
37*
38*
39* @retval CPA_STATUS_SUCCESS        Success
40* @retval CPA_STATUS_FAIL           Function failed.
41* @retval CPA_STATUS_RESOURCE       Problem Acquiring system resource
42* @retval CPA_STATUS_RETRY          Failed to send message to QAT due to queue
43*                                   full condition
44*
45*****************************************************************************/
46CpaStatus LacSymQueue_RequestSend(const CpaInstanceHandle instanceHandle,
47				  lac_sym_bulk_cookie_t *pRequest,
48				  lac_session_desc_t *pSessionDesc);
49
50#endif /* LAC_SYM_QUEUE_H */
51