]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/examples/vm_power_manager/channel_monitor.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef CHANNEL_MONITOR_H_
6 #define CHANNEL_MONITOR_H_
8 #include "channel_manager.h"
9 #include "channel_commands.h"
21 struct channel_packet pkt
;
22 uint32_t pfid
[MAX_VFS
];
23 uint32_t port
[MAX_VFS
];
25 struct core_share core_share
[MAX_VCPU_PER_VM
];
33 * Setup the Channel Monitor resources required to initialize epoll.
34 * Must be called first before calling other functions.
38 * - Negative on error.
40 int channel_monitor_init(void);
43 * Run the channel monitor, loops forever on on epoll_wait.
49 void run_channel_monitor(void);
52 * Exit the Channel Monitor, exiting the epoll_wait loop and events processing.
56 * - Negative on error.
58 void channel_monitor_exit(void);
61 * Add an open channel to monitor via epoll. A pointer to struct channel_info
62 * will be registered with epoll for event processing.
66 * Pointer to struct channel_info pointer.
70 * - Negative on error.
72 int add_channel_to_monitor(struct channel_info
**chan_info
);
75 * Remove a previously added channel from epoll control.
78 * Pointer to struct channel_info.
82 * - Negative on error.
84 int remove_channel_from_monitor(struct channel_info
*chan_info
);
91 #endif /* CHANNEL_MONITOR_H_ */