2 // Copyright (c) 2010-2017 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef _STATS_PRIO_TASK_H_
18 #define _STATS_PRIO_TASK_H_
24 struct prio_task_stats_sample {
26 uint64_t drop_tx_fail_prio[8];
30 struct prio_task_rt_stats {
31 uint64_t drop_tx_fail_prio[8];
35 struct prio_task_stats {
36 uint64_t tot_drop_tx_fail_prio[8];
37 uint64_t tot_rx_prio[8];
40 struct prio_task_stats_sample sample[2];
41 struct prio_task_rt_stats *stats;
44 int stats_get_n_prio_tasks_tot(void);
45 void stats_prio_task_reset(void);
46 void stats_prio_task_post_proc(void);
47 void stats_prio_task_update(void);
48 void stats_prio_task_init(void);
50 struct prio_task_stats_sample *stats_get_prio_task_stats_sample(uint32_t task_id, int last);
51 struct prio_task_stats_sample *stats_get_prio_task_stats_sample_by_core_task(uint32_t lcore_id, uint32_t task_id, int last);
52 uint64_t stats_core_task_tot_drop_tx_fail_prio(uint8_t task_id, uint8_t prio);
53 uint64_t stats_core_task_tot_rx_prio(uint8_t task_id, uint8_t prio);
55 #endif /* _STATS_PRIO_TASK_H_ */