Motr  M0
internal.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2015-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_ADDB2_INTERNAL_H__
26 #define __MOTR_ADDB2_INTERNAL_H__
27 
34 #define HEADER_XO(h) &(struct m0_xcode_obj) { \
35  .xo_type = m0_addb2_frame_header_xc, \
36  .xo_ptr = (h) \
37 }
38 
39 #define TRACE_XO(t) &(struct m0_xcode_obj) { \
40  .xo_type = m0_addb2_trace_xc, \
41  .xo_ptr = (t) \
42 }
43 
44 enum {
53  FRAME_SIZE_MAX = 4 * 1024 * 1024,
54 };
55 
56 M0_INTERNAL m0_bcount_t m0_addb2_trace_size(const struct m0_addb2_trace *trace);
57 
58 M0_EXTERN uint64_t m0_addb2__dummy_payload[];
59 M0_EXTERN uint64_t m0_addb2__dummy_payload_size;
60 
61 M0_TL_DESCR_DECLARE(tr, M0_EXTERN);
62 M0_TL_DECLARE(tr, M0_INTERNAL, struct m0_addb2_trace_obj);
63 
64 M0_TL_DESCR_DECLARE(mach, M0_EXTERN);
65 M0_TL_DECLARE(mach, M0_INTERNAL, struct m0_addb2_mach);
66 
67 M0_INTERNAL void m0_addb2__mach_print(const struct m0_addb2_mach *m);
68 
69 M0_EXTERN const struct m0_fom_type_ops m0_addb2__fom_type_ops;
70 M0_EXTERN const struct m0_sm_conf m0_addb2__sm_conf;
71 
77  BSHIFT = 16,
79 };
80 
82 struct m0_addb2_sensor;
83 
84 M0_INTERNAL void m0_addb2__counter_snapshot(struct m0_addb2_sensor *s,
85  uint64_t *area);
86 M0_INTERNAL void m0_addb2__counter_data_init(struct m0_addb2_counter_data *d);
87 
88 enum {
93 };
94 
107 };
108 
109 M0_INTERNAL struct m0_addb2_module *m0_addb2_module_get(void);
110 
112 #endif /* __MOTR_ADDB2_INTERNAL_H__ */
113 
114 /*
115  * Local variables:
116  * c-indentation-style: "K&R"
117  * c-basic-offset: 8
118  * tab-width: 8
119  * fill-column: 80
120  * scroll-step: 1
121  * End:
122  */
123 /*
124  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
125  */
M0_TL_DESCR_DECLARE(tr, M0_EXTERN)
static struct m0_addb2_mach * m
Definition: consumer.c:38
M0_INTERNAL struct m0_addb2_module * m0_addb2_module_get(void)
Definition: addb2.c:765
Definition: sm.h:350
Definition: internal.h:78
M0_EXTERN uint64_t m0_addb2__dummy_payload[]
Definition: internal.h:58
M0_EXTERN const struct m0_sm_conf m0_addb2__sm_conf
Definition: internal.h:70
static struct m0_addb2_mach * mach
Definition: storage.c:42
#define M0_BITS(...)
Definition: misc.h:236
uint64_t m0_bcount_t
Definition: types.h:77
M0_TL_DECLARE(tr, M0_INTERNAL, struct m0_addb2_trace_obj)
M0_INTERNAL void m0_addb2__mach_print(const struct m0_addb2_mach *m)
Definition: addb2.c:1139
struct m0_addb2_philter * am_philter[M0_ADDB2_GLOBAL_PHILTERS]
Definition: internal.h:106
struct m0_addb2_sys * am_sys
Definition: internal.h:102
storage_constants
Definition: internal.h:72
M0_INTERNAL void m0_addb2__counter_data_init(struct m0_addb2_counter_data *d)
Definition: counter.c:167
M0_INTERNAL void m0_addb2__counter_snapshot(struct m0_addb2_sensor *s, uint64_t *area)
Definition: counter.c:135
M0_INTERNAL m0_bcount_t m0_addb2_trace_size(const struct m0_addb2_trace *trace)
Definition: addb2.c:683
M0_EXTERN const struct m0_fom_type_ops m0_addb2__fom_type_ops
Definition: internal.h:69
M0_EXTERN uint64_t m0_addb2__dummy_payload_size
Definition: internal.h:59
static struct m0_addb2_source * s
Definition: consumer.c:39