summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user.api
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-03-23 09:34:59 -0700
committerSteven Luong <sluong@cisco.com>2020-04-27 09:25:32 -0700
commitbc0d9ff6727d77668e216aba1c6d6cb753fa2ac3 (patch)
treedc2af469cf255d3d819dd52f1cc6703d708f9728 /src/vnet/devices/virtio/vhost_user.api
parentba6deb96e923f71aa9387c06000412c3fb1362fa (diff)
virtio: support virtio 1.1 packed ring in vhost
virtio 1.1 defines a number of new features. Packed ring is among the most notable and important one. It combines used, available, and descripptor rings into one. This patch provides experimental support for packed ring. To avoid regression, when packed ring is configured for the interface, it is branched to a separate RX and TX driver. Non packed ring should continue to perform as it was before. Packed ring is tested using qemu4.2 and ubuntu focal fossa (kernel 5.4.0-12) on the guess VM which supports packed ring. To configure VPP with packed ring, just add the optional keyword "packed" when creating the vhost interface. To bring up the guest VM with packed ring, add "packed=on" in the qemu launch command. To facilitate troubleshooting, also added "verbose" option in show vhost desc CLI to include displaying the indirect descriptors. Known qemu reconnect issue - If VPP is restarted, guest VMs also need to be restarted. The problem is kernel virtio-net-pci keeps track of the previous available and used indices. For virtio 1.0, these indices are in shared memory and qemu can easily copy them to pass to the backend for reconnect. For virio 1.1, these indices are no longer in shared memory. Qemu needs a new mechanism to retrieve them and it is not currently implemented. So when the protocol reconnects, qemu does not have the correct available and used indices to pass to the backend. As a result, after the reconnect, virtio-net-pci is reading the TX ring from the wrong position in the ring, not the same position which the backend is writing. Similar problem exists also in the RX. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I5afc50b0bafab5a1de7a6dd10f399db3fafd144c
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user.api')
-rw-r--r--src/vnet/devices/virtio/vhost_user.api6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.api b/src/vnet/devices/virtio/vhost_user.api
index 9b057552c00..127b0a27fc7 100644
--- a/src/vnet/devices/virtio/vhost_user.api
+++ b/src/vnet/devices/virtio/vhost_user.api
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-option version = "4.0.0";
+option version = "4.0.1";
import "vnet/interface_types.api";
import "vnet/ethernet/ethernet_types.api";
@@ -27,6 +27,7 @@ import "vnet/devices/virtio/virtio_types.api";
@param disable_mrg_rxbuf - disable the use of merge receive buffers
@param disable_indirect_desc - disable the use of indirect descriptors which driver can use
@param enable_gso - enable gso support (default 0)
+ @param enable_packed - enable packed ring support (default 0)
@param mac_address - hardware address to use if 'use_custom_mac' is set
*/
define create_vhost_user_if
@@ -39,6 +40,7 @@ define create_vhost_user_if
bool disable_mrg_rxbuf;
bool disable_indirect_desc;
bool enable_gso;
+ bool enable_packed;
u32 custom_dev_instance;
bool use_custom_mac;
vl_api_mac_address_t mac_address;
@@ -62,6 +64,7 @@ define create_vhost_user_if_reply
@param is_server - our side is socket server
@param sock_filename - unix socket filename, used to speak with frontend
@param enable_gso - enable gso support (default 0)
+ @param enable_packed - enable packed ring support (default 0)
*/
autoreply define modify_vhost_user_if
{
@@ -72,6 +75,7 @@ autoreply define modify_vhost_user_if
string sock_filename[256];
bool renumber;
bool enable_gso;
+ bool enable_packed;
u32 custom_dev_instance;
};