X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Fvhost_lib.rst;h=171e0096f6d4ca44de6f122cc12ec173ff47a6f4;hb=e0ad8d2bdafcd74eb960bf96507fed11cc97d58c;hp=5094999727451cc861194f241cfe33fa4f3132cd;hpb=0c0935c5f794c66e587d8e0fa5bb2dc75c9c010d;p=dpdk.git diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 5094999727..171e0096f6 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -218,26 +218,22 @@ The following is an overview of some key Vhost API functions: Enable or disable zero copy feature of the vhost crypto backend. -* ``rte_vhost_async_channel_register(vid, queue_id, features, ops)`` +* ``rte_vhost_async_channel_register(vid, queue_id, config, ops)`` - Register a vhost queue with async copy device channel after vring - is enabled. Following device ``features`` must be specified together + Register an async copy device channel for a vhost queue after vring + is enabled. Following device ``config`` must be specified together with the registration: - * ``async_inorder`` + * ``features`` - Async copy device can guarantee the ordering of copy completion - sequence. Copies are completed in the same order with that at - the submission time. + This field is used to specify async copy device features. - Currently, only ``async_inorder`` capable device is supported by vhost. + ``RTE_VHOST_ASYNC_INORDER`` represents the async copy device can + guarantee the order of copy completion is the same as the order + of copy submission. - * ``async_threshold`` - - The copy length (in bytes) below which CPU copy will be used even if - applications call async vhost APIs to enqueue/dequeue data. - - Typical value is 512~1024 depending on the async device capability. + Currently, only ``RTE_VHOST_ASYNC_INORDER`` capable device is + supported by vhost. Applications must provide following ``ops`` callbacks for vhost lib to work with the async copy devices: @@ -253,6 +249,14 @@ The following is an overview of some key Vhost API functions: vhost invokes this function to get the copy data completed by async devices. +* ``rte_vhost_async_channel_register_thread_unsafe(vid, queue_id, config, ops)`` + + Register an async copy device channel for a vhost queue without + performing any locking. + + This function is only safe to call in vhost callback functions + (i.e., struct vhost_device_ops). + * ``rte_vhost_async_channel_unregister(vid, queue_id)`` Unregister the async copy device channel from a vhost queue. @@ -265,6 +269,14 @@ The following is an overview of some key Vhost API functions: devices for all vhost queues in destroy_device(), when a virtio device is paused or shut down. +* ``rte_vhost_async_channel_unregister_thread_unsafe(vid, queue_id)`` + + Unregister the async copy device channel for a vhost queue without + performing any locking. + + This function is only safe to call in vhost callback functions + (i.e., struct vhost_device_ops). + * ``rte_vhost_submit_enqueue_burst(vid, queue_id, pkts, count, comp_pkts, comp_count)`` Submit an enqueue request to transmit ``count`` packets from host to guest @@ -286,6 +298,11 @@ The following is an overview of some key Vhost API functions: This function returns the amount of in-flight packets for the vhost queue using async acceleration. +* ``rte_vhost_clear_queue_thread_unsafe(vid, queue_id, **pkts, count)`` + + Clear inflight packets which are submitted to DMA engine in vhost async data + path. Completed packets are returned to applications through ``pkts``. + Vhost-user Implementations --------------------------