a4b91b4f1a535bb4b2b63175435eef410c7059ad
[dpdk.git] / drivers / common / octeontx2 / otx2_common.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2019 Marvell International Ltd.
3  */
4
5 #include <rte_log.h>
6
7 #include "otx2_common.h"
8
9 /**
10  * @internal
11  */
12 int otx2_logtype_base;
13 /**
14  * @internal
15  */
16 int otx2_logtype_mbox;
17 /**
18  * @internal
19  */
20 int otx2_logtype_npa;
21 /**
22  * @internal
23  */
24 int otx2_logtype_nix;
25 /**
26  * @internal
27  */
28 int otx2_logtype_npc;
29 /**
30  * @internal
31  */
32 int otx2_logtype_tm;
33 /**
34  * @internal
35  */
36 int otx2_logtype_sso;
37 /**
38  * @internal
39  */
40 int otx2_logtype_tim;
41 /**
42  * @internal
43  */
44 int otx2_logtype_dpi;
45
46 RTE_INIT(otx2_log_init);
47 static void
48 otx2_log_init(void)
49 {
50         otx2_logtype_base = rte_log_register("pmd.octeontx2.base");
51         if (otx2_logtype_base >= 0)
52                 rte_log_set_level(otx2_logtype_base, RTE_LOG_NOTICE);
53
54         otx2_logtype_mbox = rte_log_register("pmd.octeontx2.mbox");
55         if (otx2_logtype_mbox >= 0)
56                 rte_log_set_level(otx2_logtype_mbox, RTE_LOG_NOTICE);
57
58         otx2_logtype_npa = rte_log_register("pmd.mempool.octeontx2");
59         if (otx2_logtype_npa >= 0)
60                 rte_log_set_level(otx2_logtype_npa, RTE_LOG_NOTICE);
61
62         otx2_logtype_nix = rte_log_register("pmd.net.octeontx2");
63         if (otx2_logtype_nix >= 0)
64                 rte_log_set_level(otx2_logtype_nix, RTE_LOG_NOTICE);
65
66         otx2_logtype_npc = rte_log_register("pmd.net.octeontx2.flow");
67         if (otx2_logtype_npc >= 0)
68                 rte_log_set_level(otx2_logtype_npc, RTE_LOG_NOTICE);
69
70         otx2_logtype_tm = rte_log_register("pmd.net.octeontx2.tm");
71         if (otx2_logtype_tm >= 0)
72                 rte_log_set_level(otx2_logtype_tm, RTE_LOG_NOTICE);
73
74         otx2_logtype_sso = rte_log_register("pmd.event.octeontx2");
75         if (otx2_logtype_sso >= 0)
76                 rte_log_set_level(otx2_logtype_sso, RTE_LOG_NOTICE);
77
78         otx2_logtype_tim = rte_log_register("pmd.event.octeontx2.timer");
79         if (otx2_logtype_tim >= 0)
80                 rte_log_set_level(otx2_logtype_tim, RTE_LOG_NOTICE);
81
82         otx2_logtype_dpi = rte_log_register("pmd.raw.octeontx2.dpi");
83         if (otx2_logtype_dpi >= 0)
84                 rte_log_set_level(otx2_logtype_dpi, RTE_LOG_NOTICE);
85 }