From 8d9e80583fbb8ffb30e63153ef5b2b21c6b336fa Mon Sep 17 00:00:00 2001 From: John Lo Date: Tue, 31 May 2016 15:42:40 -0400 Subject: VPP-102: vHost reconnect to previously used sockets on VPP restart Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1 Signed-off-by: John Lo --- vnet/vnet/devices/dpdk/vhost_user.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index c82b37f9927..1f98613e64b 100644 --- a/vnet/vnet/devices/dpdk/vhost_user.c +++ b/vnet/vnet/devices/dpdk/vhost_user.c @@ -589,6 +589,14 @@ dpdk_vhost_user_set_vring_addr(u32 hw_if_index, u8 idx, u64 desc, \ clib_warning("falied to set vring addr"); } + if (vq->last_used_idx != vq->used->idx) { + clib_warning("last_used_idx (%u) and vq->used->idx (%u) mismatches; " + "some packets maybe resent for Tx and dropped for Rx", + vq->last_used_idx, vq->used->idx); + vq->last_used_idx = vq->used->idx; + vq->last_used_idx_res = vq->used->idx; + } + /* * Inform the guest that there is no need to inform (kick) the * host when it adds buffers. kick results in vmexit and will -- cgit 1.2.3-korg