1/* SPDX-License-Identifier: BSD-3-Clause */
2/* Copyright(c) 2007-2022 Intel Corporation */
3/*****************************************************************************
4 * @file icp_adf_poll.h
5 *
6 * @description
7 *      File contains Public API Definitions for the polling method.
8 *
9 *****************************************************************************/
10#ifndef ICP_ADF_POLL_H
11#define ICP_ADF_POLL_H
12
13#include "cpa.h"
14/*
15 * icp_adf_pollInstance
16 *
17 * Description:
18 * Poll an instance. In order to poll an instance
19 * sal will pass in a table of trans handles from which
20 * the ring to be polled can be obtained and subsequently
21 * polled.
22 *
23 * Returns:
24 *   CPA_STATUS_SUCCESS   on polling a ring with data
25 *   CPA_STATUS_FAIL      on failure
26 *   CPA_STATUS_RETRY     if ring has no data on it
27 *                        or ring is already being polled.
28 */
29CpaStatus icp_adf_pollInstance(icp_comms_trans_handle *trans_hnd,
30			       Cpa32U num_transHandles,
31			       Cpa32U response_quota);
32
33/*
34 * icp_adf_check_RespInstance
35 *
36 * Description:
37 * Check whether an instance is empty or has remaining responses on it. In
38 * order to check an instance for the remaining responses, sal will pass in
39 * a table of trans handles from which the instance to be checked can be
40 * obtained and subsequently checked.
41 *
42 * Returns:
43 *   CPA_STATUS_SUCCESS         if response ring is empty
44 *   CPA_STATUS_FAIL            on failure
45 *   CPA_STATUS_RETRY           if response ring is not empty
46 *   CPA_STATUS_INVALID_PARAM   Invalid parameter passed in
47 */
48CpaStatus icp_adf_check_RespInstance(icp_comms_trans_handle *trans_hnd,
49				     Cpa32U num_transHandles);
50
51#endif /* ICP_ADF_POLL_H */
52