Support packets in flight
[samplevnf.git] / VNFs / DPPD-PROX / stats_l4gen.h
1 /*
2 // Copyright (c) 2010-2017 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 #ifndef _STATS_L4GEN_H_
18 #define _STATS_L4GEN_H_
19
20 #include <inttypes.h>
21
22 #include "genl4_bundle.h"
23
24 struct task_l4gen_stats;
25
26 struct l4_stats_sample {
27         uint64_t        tsc;
28         struct l4_stats stats;
29 };
30
31 struct task_l4_stats {
32         struct task_l4gen_stats *task;
33         struct l4_stats_sample sample[2];
34         uint8_t lcore_id;
35         uint8_t task_id;
36 };
37
38 void stats_l4gen_init(void);
39 void stats_l4gen_update(void);
40 int stats_get_n_l4gen(void);
41 struct task_l4_stats *stats_get_l4_stats(uint32_t i);
42 struct l4_stats_sample *stats_get_l4_stats_sample(uint32_t i, int l);
43
44 #endif /* _STATS_L4GEN_H_ */