aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qat/qat_api/common/include/lac_log.h
blob: cbfffb7822a2b17458ee266d5c8be00711128123 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright(c) 2007-2022 Intel Corporation */

/**
 ***************************************************************************
 * @file lac_log.h
 *
 * @defgroup LacLog     Log
 *
 * @ingroup LacCommon
 *
 * Logging Macros. These macros also log the function name they are called in.
 *
 ***************************************************************************/

/***************************************************************************/

#ifndef LAC_LOG_H
#define LAC_LOG_H

/***************************************************************************
 * Include public/global header files
 ***************************************************************************/
#include "cpa.h"
#include "lac_common.h"
#include "icp_accel_devices.h"

#define LAC_INVALID_PARAM_LOG_(log, args...)                                   \
	QAT_UTILS_LOG("[error] %s() - : Invalid API Param - " log "\n",        \
		      __func__,                                                \
		      ##args)

#define LAC_INVALID_PARAM_LOG(log) LAC_INVALID_PARAM_LOG_(log)

#define LAC_INVALID_PARAM_LOG1(log, param1) LAC_INVALID_PARAM_LOG_(log, param1)

#define LAC_INVALID_PARAM_LOG2(log, param1, param2)                            \
	LAC_INVALID_PARAM_LOG_(log, param1, param2)

#define LAC_UNSUPPORTED_PARAM_LOG(log)                                         \
	QAT_UTILS_LOG("%s() - : UnSupported API Param - " log "\n", __func__)

#define LAC_LOG_ERROR(log) QAT_UTILS_LOG("%s() - : " log "\n", __func__)

#endif /* LAC_LOG_H */