diff options
author | John Lo <loj@cisco.com> | 2016-05-31 15:42:40 -0400 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-05-31 23:32:09 +0000 |
commit | 8d9e80583fbb8ffb30e63153ef5b2b21c6b336fa (patch) | |
tree | 2995813f857334ca20fd37ce3a0a21288a4cb1c7 | |
parent | 6795fb9f70f2234fc0c35f0634bb9ac16f848183 (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.c | 8 |
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 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 |