NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_devemu_vfs.h File Reference
#include <stdint.h>
#include <linux/fuse.h>
#include <doca_buf.h>
#include <doca_error.h>
#include <doca_dev.h>
#include <doca_devemu_pci.h>
#include <doca_devemu_virtio.h>
Include dependency graph for doca_devemu_vfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DOCA_VFS_TAG_SIZE   21
 Size, in bytes, of the virtio FS tag in DOCA. According to the specification this is the name associated with the file system. The tag is encoded in UTF-8 and padded with NULL bytes if shorter than the available space. This field is not NULL terminated according to the Virtio specification. In DOCA, the tag encoding is shorter than in the Virtio specification and must be NULL terminated (only first 20 bytes are allowed to be encoded with non-NULL bytes). More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_init (struct doca_devemu_vfs_cfg *cfg)
 Initialize the DOCA devemu Virtio FS. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_teardown (void)
 Teardown the DOCA devemu Virtio FS. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_create (struct doca_devemu_vfs_cfg **cfg)
 Create DOCA devemu Virtio FS configuration structure. The new structure is populated with the default configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_destroy (struct doca_devemu_vfs_cfg *cfg)
 Destroy DOCA devemu Virtio FS configuration structure. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_get_vfs_req_user_data_size (const struct doca_devemu_vfs_cfg *cfg, uint32_t *req_user_data_size)
 Get the size of the user data buffer that will be allocated for each doca_devemu_vfs_req on behalf of the user. This buffer will be valid and used by the user upon receiving new doca_devemu_vfs_req. The buffer will become invalid after doca_devemu_vfs_req completion. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_set_vfs_req_user_data_size (struct doca_devemu_vfs_cfg *cfg, uint32_t req_user_data_size)
 Set the size of the user data buffer that will be allocated for each doca_devemu_vfs_req on behalf of the user. This buffer will be valid and used by the user upon receiving new doca_devemu_vfs_req. The buffer will become invalid after doca_devemu_vfs_req completion. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_get_notification_req_user_data_size (const struct doca_devemu_vfs_cfg *cfg, uint32_t *req_user_data_size)
 Get the size of the user data buffer that will be allocated for each doca_devemu_vfs_notification_req on behalf of the user. This buffer will be valid and used by the user upon receiving new doca_devemu_vfs_notification_req. The buffer will become invalid after doca_devemu_vfs_notification_req completion. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_cfg_set_notification_req_user_data_size (struct doca_devemu_vfs_cfg *cfg, uint32_t req_user_data_size)
 Set the size of the user data buffer that will be allocated for each doca_devemu_vfs_notification_req on behalf of the user. This buffer will be valid and used by the user upon receiving new doca_devemu_vfs_notification_req. The buffer will become invalid after doca_devemu_vfs_notification_req completion. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_create (struct doca_devemu_vfs_type *vfs_type, struct doca_dev_rep *dev_rep, struct doca_pe *progress_engine, struct doca_devemu_vfs_dev **vfs_dev)
 Allocate DOCA Virtio FS device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_destroy (struct doca_devemu_vfs_dev *vfs_dev)
 Free a DOCA Virtio FS device object. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_get_tag (const struct doca_devemu_vfs_dev *vfs_dev, char tag[DOCA_VFS_TAG_SIZE])
 Get the value of the Virtio FS device tag. According to the specification the tag is encoded in UTF-8 and padded with NULL bytes if shorter than the available space of 36 bytes and is not NULL-terminated if the encoded bytes take up the entire field of 36 bytes. In DOCA, the tag is always NULL terminated and is shorter than the Virtio specification definition. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_set_tag (struct doca_devemu_vfs_dev *vfs_dev, const char tag[DOCA_VFS_TAG_SIZE])
 Set the value of the Virtio FS device tag. According to the specification the tag is encoded in UTF-8 and padded with NULL bytes if shorter than the available space of 36 bytes and is not NULL-terminated if the encoded bytes take up the entire field of 36 bytes. In DOCA, the tag is always NULL terminated and is shorter than the Virtio specification definition. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_get_num_request_queues (const struct doca_devemu_vfs_dev *vfs_dev, uint32_t *num_request_queues)
 Get the value of the VIRTIO FS Device num_request_queues register. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_set_num_request_queues (struct doca_devemu_vfs_dev *vfs_dev, uint32_t num_request_queues)
 Set the value of the VIRTIO FS Device num_request_queues register. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_get_notify_buf_size (const struct doca_devemu_vfs_dev *vfs_dev, uint32_t *notify_buf_size)
 Get the value of the VIRTIO FS Device notify_buf_size register. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_set_notify_buf_size (struct doca_devemu_vfs_dev *vfs_dev, uint32_t notify_buf_size)
 Set the value of the VIRTIO FS Device notify_buf_size register. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_devemu_vfs_dev_get_req_src_domain_id_range (const struct doca_devemu_vfs_dev *vfs_dev, uint16_t *min_src_domain_id, uint16_t *max_src_domain_id)
 Get the range of source domain identifiers for requests associated with a DOCA VIRTIO FS device. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_devemu_vfs_dev_as_ctx (struct doca_devemu_vfs_dev *vfs_dev)
 Convert DOCA Virtio FS device instance into DOCA context. More...
 
DOCA_EXPERIMENTAL struct doca_devemu_virtio_dev * doca_devemu_vfs_dev_as_virtio_dev (struct doca_devemu_vfs_dev *vfs_dev)
 Convert DOCA Virtio FS device instance into DOCA Virtio device. More...
 
DOCA_EXPERIMENTAL struct doca_devemu_pci_dev * doca_devemu_vfs_dev_as_pci_dev (struct doca_devemu_vfs_dev *vfs_dev)
 Convert DOCA Virtio FS device instance into DOCA devemu PCI device. More...