[PATCH v2 1/2] vhost: add logging mechanism for reconnection

Maxime Coquelin maxime.coquelin at redhat.com
Mon Sep 23 21:46:52 CEST 2024



On 9/23/24 17:42, David Marchand wrote:
> On Fri, Sep 20, 2024 at 11:09 AM Maxime Coquelin
> <maxime.coquelin at redhat.com> wrote:
>>
>> This patch introduces a way for backend to keep track
>> of the needed information to be able to reconnect without
>> frontend cooperation.
>>
>> It will be used for VDUSE, which does not provide interface
>> for the backend to save and later recover local virtqueues
>> metadata needed to reconnect.
>>
>> Vhost-user support could also be added for improved packed
>> ring reconnection support.
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> 
> vq->last_avail_idx gets updated in other places and I suspect we are
> missing some calls to vhost_virtqueue_reconnect_log_split/packed.
> I spotted:
> - lib/vhost/vhost.c: rte_vhost_set_vring_base()
> - lib/vhost/vhost_user.c:  translate_ring_addresses(),
> vhost_user_set_vring_base().
> 
> The rest lgtm.
> 
> 

Thanks, I patched the missing avail index updates you identified.

And also added your R-by as asked off-list.

Maxime



More information about the dev mailing list