summaryrefslogtreecommitdiff
path: root/lib/eal/include/rte_hypervisor.h
blob: 1666431ce3ded3a79f8a6dddc4abc58b20870189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright 2017 Mellanox Technologies, Ltd
 */

#ifndef RTE_HYPERVISOR_H
#define RTE_HYPERVISOR_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file
 * Hypervisor awareness.
 */

enum rte_hypervisor {
	RTE_HYPERVISOR_NONE,
	RTE_HYPERVISOR_KVM,
	RTE_HYPERVISOR_HYPERV,
	RTE_HYPERVISOR_VMWARE,
	RTE_HYPERVISOR_UNKNOWN
};

/**
 * Get the id of hypervisor it is running on.
 */
enum rte_hypervisor
rte_hypervisor_get(void);

/**
 * Get the name of a given hypervisor id.
 */
const char *
rte_hypervisor_get_name(enum rte_hypervisor id);

#ifdef __cplusplus
}
#endif

#endif /* RTE_HYPERVISOR_H */