NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_devemu_virtio_type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
25 #ifndef DOCA_DEVEMU_VIRTIO_TYPE_H_
26 #define DOCA_DEVEMU_VIRTIO_TYPE_H_
27 
28 #include <stdint.h>
29 
30 #include <doca_error.h>
31 #include <doca_dev.h>
32 #include <doca_devemu_pci.h>
33 #include <doca_devemu_virtio.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*********************************************************************************************************************
40  * DOCA devemu Virtio type API
41  *********************************************************************************************************************/
42 
53 struct doca_devemu_pci_type *doca_devemu_virtio_type_as_pci_type(struct doca_devemu_virtio_type *virtio_type);
54 
69 doca_error_t doca_devemu_virtio_type_get_num_queues(const struct doca_devemu_virtio_type *virtio_type,
70  uint16_t *num_queues);
71 
86 doca_error_t doca_devemu_virtio_type_get_queue_size(const struct doca_devemu_virtio_type *virtio_type,
87  uint16_t *queue_size);
88 
102 doca_error_t doca_devemu_virtio_type_get_device_features_63_0(const struct doca_devemu_virtio_type *virtio_type,
103  uint64_t *features);
104 
118 doca_error_t doca_devemu_virtio_type_get_config_generation(const struct doca_devemu_virtio_type *virtio_type,
119  uint8_t *config_generation);
120 
137  const struct doca_devemu_virtio_type *virtio_type, uint64_t *features);
138 
153 doca_error_t doca_devemu_virtio_cap_default_type_get_max_num_queues(const struct doca_devemu_virtio_type *virtio_type,
154  uint16_t *num_queues);
155 
156 #ifdef __cplusplus
157 }
158 #endif
159 
162 #endif /* DOCA_DEVEMU_VIRTIO_TYPE_H_ */
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_type_get_device_features_63_0(const struct doca_devemu_virtio_type *virtio_type, uint64_t *features)
Get the Virtio device_feature bits (0-63) according to Virtio specification configured for this type.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_type_get_config_generation(const struct doca_devemu_virtio_type *virtio_type, uint8_t *config_generation)
Get the initial Virtio device config_generation register according to Virtio specification configured...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_cap_default_type_get_max_num_queues(const struct doca_devemu_virtio_type *virtio_type, uint16_t *num_queues)
Get the maximum number of queues that can be configured for any Virtio device associated with the giv...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_type_get_queue_size(const struct doca_devemu_virtio_type *virtio_type, uint16_t *queue_size)
Get the value of the queue_size register.
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_cap_default_type_get_configurable_device_features_63_0(const struct doca_devemu_virtio_type *virtio_type, uint64_t *features)
Get a bitmap of configurable device feature bits (0-63) for Virtio devices associated with the given ...
DOCA_EXPERIMENTAL doca_error_t doca_devemu_virtio_type_get_num_queues(const struct doca_devemu_virtio_type *virtio_type, uint16_t *num_queues)
Get the value of the num_queues register.
DOCA_EXPERIMENTAL struct doca_devemu_pci_type * doca_devemu_virtio_type_as_pci_type(struct doca_devemu_virtio_type *virtio_type)
Convert DOCA Virtio type instance into DOCA PCI type.
enum doca_error doca_error_t
DOCA API return codes.