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

Macros

#define DOCA_DEVEMU_VIRTIOFS_NOTIFICATION_QUEUE_BIT_IN_DEVICE_FEATURES   (1ULL << 0)
 Bit index in device features returned by doca_devemu_virtio_cap_default_type_get_configurable_device_features_63_0() that is set if the notification queue is enabled for VirtioFS type. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_is_default_vfs_type_supported (const struct doca_devinfo *devinfo, uint8_t *supported)
 Check if the default DOCA Virtio FS type is supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_find_default_vfs_type_by_dev (struct doca_dev *dev, struct doca_devemu_vfs_type **vfs_type)
 Find the default DOCA Virtio FS type associated with the device. More...
 
DOCA_EXPERIMENTAL struct doca_devemu_virtio_type * doca_devemu_vfs_type_as_virtio_type (struct doca_devemu_vfs_type *vfs_type)
 Convert DOCA Virtio FS type instance into DOCA Virtio type. More...
 
DOCA_EXPERIMENTAL struct doca_devemu_pci_type * doca_devemu_vfs_type_as_pci_type (struct doca_devemu_vfs_type *vfs_type)
 Convert DOCA Virtio FS type instance into DOCA PCI type. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_type_get_num_request_queues (const struct doca_devemu_vfs_type *vfs_type, uint32_t *num_request_queues)
 Get the value of the num_request_queues register. More...
 

Detailed Description

DOCA Virtio FS type

Macro Definition Documentation

◆ DOCA_DEVEMU_VIRTIOFS_NOTIFICATION_QUEUE_BIT_IN_DEVICE_FEATURES

#define DOCA_DEVEMU_VIRTIOFS_NOTIFICATION_QUEUE_BIT_IN_DEVICE_FEATURES   (1ULL << 0)

Bit index in device features returned by doca_devemu_virtio_cap_default_type_get_configurable_device_features_63_0() that is set if the notification queue is enabled for VirtioFS type.

Definition at line 46 of file doca_devemu_vfs_type.h.

Function Documentation

◆ doca_devemu_vfs_find_default_vfs_type_by_dev()

DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_find_default_vfs_type_by_dev ( struct doca_dev *  dev,
struct doca_devemu_vfs_type **  vfs_type 
)

Find the default DOCA Virtio FS type associated with the device.

Parameters
[in]devThe doca dev associated with the default type.
[out]vfs_typeStarted DOCA Virtio FS default type.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - 'dev' or 'vfs_type' are NULL.
  • DOCA_ERROR_OPERATING_SYSTEM - a system call has failed.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources for the type.
  • DOCA_ERROR_NOT_SUPPORTED - type is not supported by the device.

◆ doca_devemu_vfs_is_default_vfs_type_supported()

DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_is_default_vfs_type_supported ( const struct doca_devinfo *  devinfo,
uint8_t *  supported 
)

Check if the default DOCA Virtio FS type is supported by the device.

Get uint8_t value defining if the device can be used to manage DOCA Virtio FS emulated devices associated with the default Virtio FS type.

Parameters
[in]devinfoThe device to query.
[out]supported1 if the default Virtio FS type is supported by the device, 0 otherwise.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - 'devinfo' or 'supported' are NULL.
  • DOCA_ERROR_DRIVER - internal doca driver error

◆ doca_devemu_vfs_type_as_pci_type()

DOCA_EXPERIMENTAL struct doca_devemu_pci_type* doca_devemu_vfs_type_as_pci_type ( struct doca_devemu_vfs_type *  vfs_type)

Convert DOCA Virtio FS type instance into DOCA PCI type.

Parameters
[in]vfs_typeDOCA Virtio FS 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_vfs_type_as_virtio_type()

DOCA_EXPERIMENTAL struct doca_devemu_virtio_type* doca_devemu_vfs_type_as_virtio_type ( struct doca_devemu_vfs_type *  vfs_type)

Convert DOCA Virtio FS type instance into DOCA Virtio type.

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

◆ doca_devemu_vfs_type_get_num_request_queues()

DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_type_get_num_request_queues ( const struct doca_devemu_vfs_type *  vfs_type,
uint32_t *  num_request_queues 
)

Get the value of the num_request_queues register.

Parameters
[in]vfs_typeThe DOCA Virtio FS type instance to query.
[out]num_request_queuesThe virtio_fs_config:num_request_queues register value according to virtio specification to be used, by default, by devices associated with the vfs_type.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - 'vfs_type' or 'num_request_queues' are NULL