Re: [PATCH] vhost: mask the in-order used-ring log cursor

From: Jiaming Fan

Date: Mon Nov 23 2026 - 02:51:49 EST


> If the guest refills the available ring while get_rx_bufs() collects
> one mergeable-RX packet, that packet can consume more heads than
> vq->num.

The mask looks right to me. What I don't follow is how `nheads[0]`
gets to 64 on a 32-entry queue. Those buffers haven't been returned to
the driver yet, so what can it put back on the ring? Can this happen
with a conforming driver, or does the test guest reuse descriptors
that are still in flight?

Could you share the RX test program you used?

Thanks,
Jiaming Fan