NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Device Emulation - Virtio Device Types
Collaboration diagram for DOCA Device Emulation - Virtio Device Types:

Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 for this type. More...
 
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 default virtio type. More...
 
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 given default Virtio type. More...
 

Detailed Description

DOCA Virtio type

Function Documentation

◆ doca_devemu_virtio_cap_default_type_get_configurable_device_features_63_0()

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 default virtio type.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query. Must be started.
[out]featuresBitmap of configurable device feature bits for all Virtio device associated with the default Virtio type. Feature bit indices follow the Virtio specification.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_devemu_virtio_cap_default_type_get_max_num_queues()

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 given default Virtio type.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query. Must be started.
[out]num_queuesThe maximal number of queues.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_devemu_virtio_type_as_pci_type()

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.

Parameters
[in]virtio_typeDOCA Virtio type instance. This must remain valid until after the DOCA PCI type is no longer required.
Returns
DOCA PCI type upon success, NULL otherwise.

◆ doca_devemu_virtio_type_get_config_generation()

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 for this type.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query.
[out]config_generationThe initial value of the config_generation register according to Virtio specification for devices associated with this type.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_devemu_virtio_type_get_device_features_63_0()

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.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query.
[out]featuresThe device_feature (bits 0-63) according to Virtio specification for devices associated with this type.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_devemu_virtio_type_get_num_queues()

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.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query.
[out]num_queuesThe default value to be used by devices associated with the virtio_type for virtio_common_config:num_queues register according to Virtio specification, if not set otherwise.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_devemu_virtio_type_get_queue_size()

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.

Parameters
[in]virtio_typeThe DOCA Virtio type instance to query.
[out]queue_sizeThe default value to be used by devices associated with the virtio_type for virtio_common_config:queue_size register according to Virtio specification, if not set otherwise.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.