summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-05-31 15:42:40 -0400
committerDave Barach <openvpp@barachs.net>2016-05-31 21:06:13 +0000
commitcb51846ae00fba9b0792fb284635e2e7b9d5fd34 (patch)
treec37e1cc103fbc0b222d94ce90424100bbb94bed1
parent17f17cb44f16c0a743661a276ef96a696ee325e9 (diff)
VPP-102: vHost reconnect to previously used sockets on VPP restart
Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1 Signed-off-by: John Lo <loj@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/vhost_user.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c
index 13f7083e73b..8a079867e8b 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, uword 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