aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorShesha Sreenivasamurthy <shesha@cisco.com>2016-04-29 01:32:42 -0400
committerDamjan Marion <damarion@cisco.com>2016-04-29 12:44:12 +0000
commit6caec3d8b42fa22938ea0aa9d8ec0db54c75ea1e (patch)
tree45240d8d7b33bbfd5d12e38116e7eef488e7ccda /vnet
parentdaf141946d7f1a053ad1590a86d7ec4cb365e43b (diff)
Improve performance of dpdk-vhost driver
By setting the flag in used table, guest is prevented from kicking the host when it adds buffers. This results in 100% performance improvement when tested throughput using iperf3. Change-Id: Iefaf5b97d1444c216bb373998732a437d333d521 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/vhost_user.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c
index 2ebf48a55b3..c82b37f9927 100644
--- a/vnet/vnet/devices/dpdk/vhost_user.c
+++ b/vnet/vnet/devices/dpdk/vhost_user.c
@@ -589,6 +589,15 @@ dpdk_vhost_user_set_vring_addr(u32 hw_if_index, u8 idx, u64 desc, \
clib_warning("falied to set vring addr");
}
+ /*
+ * Inform the guest that there is no need to inform (kick) the
+ * host when it adds buffers. kick results in vmexit and will
+ * incur performance degradation.
+ *
+ * The below function sets a flag in used table. Therefore,
+ * should be initialized after initializing vq->used.
+ */
+ rte_vhost_enable_guest_notification(&xd->vu_vhost_dev, idx, 0);
stop_processing_packets(hw_if_index, idx);
return 0;