1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef CHANNEL_MONITOR_H_
6 #define CHANNEL_MONITOR_H_
10 #include "channel_manager.h"
22 struct rte_power_channel_packet pkt;
23 uint32_t pfid[RTE_POWER_MAX_VFS];
24 uint32_t port[RTE_POWER_MAX_VFS];
26 struct core_share core_share[RTE_POWER_MAX_VCPU_PER_VM];
34 * Setup the Channel Monitor resources required to initialize epoll.
35 * Must be called first before calling other functions.
39 * - Negative on error.
41 int channel_monitor_init(void);
44 * Run the channel monitor, loops forever on on epoll_wait.
50 void run_channel_monitor(void);
53 * Exit the Channel Monitor, exiting the epoll_wait loop and events processing.
57 * - Negative on error.
59 void channel_monitor_exit(void);
62 * Add an open channel to monitor via epoll. A pointer to struct channel_info
63 * will be registered with epoll for event processing.
67 * Pointer to struct channel_info pointer.
71 * - Negative on error.
73 int add_channel_to_monitor(struct channel_info **chan_info);
76 * Remove a previously added channel from epoll control.
79 * Pointer to struct channel_info.
83 * - Negative on error.
85 int remove_channel_from_monitor(struct channel_info *chan_info);
92 #endif /* CHANNEL_MONITOR_H_ */