X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Fvhost_lib.rst;h=db921f922bd7f06f2b3011a52ab092fae5ab97f1;hb=3a66b2f90bcb08347626e26f206df07ebfa40058;hp=a86c07a6209501a1b9c51f1c53cff9fb5690e3d4;hpb=5c6c1480b3b01c2573cd52a85a01881aaa42b53f;p=dpdk.git diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index a86c07a620..db921f922b 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -63,7 +63,7 @@ The following is an overview of some key Vhost API functions: 512). * zero copy is really good for VM2VM case. For iperf between two VMs, the - boost could be above 70% (when TSO is enableld). + boost could be above 70% (when TSO is enabled). * For zero copy in VM2NIC case, guest Tx used vring may be starved if the PMD driver consume the mbuf but not release them timely. @@ -104,11 +104,6 @@ The following is an overview of some key Vhost API functions: from accessing memory the virtio device isn't allowed to, when the feature is negotiated and an IOMMU device is declared. - However, this feature enables vhost-user's reply-ack protocol feature, - which implementation is buggy in Qemu v2.7.0-v2.9.0 when doing multiqueue. - Enabling this flag with these Qemu version results in Qemu being blocked - when multiple queue pairs are declared. - - ``RTE_VHOST_USER_POSTCOPY_SUPPORT`` Postcopy live-migration support will be enabled when this flag is set. @@ -117,6 +112,41 @@ The following is an overview of some key Vhost API functions: Enabling this flag should only be done when the calling application does not pre-fault the guest shared memory, otherwise migration would fail. + - ``RTE_VHOST_USER_LINEARBUF_SUPPORT`` + + Enabling this flag forces vhost dequeue function to only provide linear + pktmbuf (no multi-segmented pktmbuf). + + The vhost library by default provides a single pktmbuf for given a + packet, but if for some reason the data doesn't fit into a single + pktmbuf (e.g., TSO is enabled), the library will allocate additional + pktmbufs from the same mempool and chain them together to create a + multi-segmented pktmbuf. + + However, the vhost application needs to support multi-segmented format. + If the vhost application does not support that format and requires large + buffers to be dequeue, this flag should be enabled to force only linear + buffers (see RTE_VHOST_USER_EXTBUF_SUPPORT) or drop the packet. + + It is disabled by default. + + - ``RTE_VHOST_USER_EXTBUF_SUPPORT`` + + Enabling this flag allows vhost dequeue function to allocate and attach + an external buffer to a pktmbuf if the pkmbuf doesn't provide enough + space to store all data. + + This is useful when the vhost application wants to support large packets + but doesn't want to increase the default mempool object size nor to + support multi-segmented mbufs (non-linear). In this case, a fresh buffer + is allocated using rte_malloc() which gets attached to a pktmbuf using + rte_pktmbuf_attach_extbuf(). + + See RTE_VHOST_USER_LINEARBUF_SUPPORT as well to disable multi-segmented + mbufs for application that doesn't support chained mbufs. + + It is disabled by default. + * ``rte_vhost_driver_set_features(path, features)`` This function sets the feature bits the vhost-user driver supports. The