On 5/9/2016 6:45 PM, Victor Kaplansky wrote: >> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c >> > index c88aaa3..df103aa 100644 >> > --- a/lib/librte_vhost/virtio-net.c >> > +++ b/lib/librte_vhost/virtio-net.c >> > @@ -560,6 +560,14 @@ vhost_set_vring_addr(int vid, struct vhost_vring_addr >> > *addr) >> > return -1; >> > } >> > >> > + if (vq->last_used_idx != vq->used->idx) { >> > + RTE_LOG(WARNING, VHOST_CONFIG, >> > + "last_used_idx (%u) and vq->used->idx (%u) mismatch\n", > I agree with this approach. I just would add to the log message that > last_user_idx > have overrode by used_idx and some packets may be dropped.
For TX, the packets are resent. For RX, the packets are dropped. > >> > + vq->last_used_idx, vq->used->idx); >> > + vq->last_used_idx = vq->used->idx; >> > + vq->last_used_idx_res = vq->used->idx; >> > + } >> > + >> > vq->log_guest_addr = addr->log_guest_addr; >> > >> > LOG_DEBUG(VHOST_CONFIG, "(%d) mapped address desc: %p\n", >> > -- >> > 1.9.0 >> >