Re: [PATCH v1 06/15] libvhost-user: Factor out adding a memory region

2024-02-03 Thread Raphael Norwitz
On Fri, Feb 2, 2024 at 4:55 PM David Hildenbrand wrote: > > Let's factor it out, reducing quite some code duplication and perparing > for further changes. > > If we fail to mmap a region and panic, we now simply don't add that > (broken) region. > > Note that we now increment dev->nregions as we a

[PATCH v1 06/15] libvhost-user: Factor out adding a memory region

2024-02-02 Thread David Hildenbrand
Let's factor it out, reducing quite some code duplication and perparing for further changes. If we fail to mmap a region and panic, we now simply don't add that (broken) region. Note that we now increment dev->nregions as we are successfully adding memory regions, and don't increment dev->nregion