On Tue, May 5, 2026 at 7:53 AM <[email protected]> wrote: > From: Pravin M Bathija <[email protected]> > > The changes in this file cover the enum message requests for > supporting add/remove memory regions. The front-end vhost-user > client sends messages like get max memory slots, add memory region > and remove memory region which are covered in these changes which > are on the vhost-user back-end. The changes also include data structure > definition of memory region to be added/removed. The data structure > VhostUserMsg has been changed to include the memory region. > > Signed-off-by: Pravin M Bathija <[email protected]> > --- > lib/vhost/vhost_user.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h > index ef486545ba..f8d921f7f1 100644 > --- a/lib/vhost/vhost_user.h > +++ b/lib/vhost/vhost_user.h > @@ -67,6 +67,9 @@ typedef enum VhostUserRequest { > VHOST_USER_POSTCOPY_END = 30, > VHOST_USER_GET_INFLIGHT_FD = 31, > VHOST_USER_SET_INFLIGHT_FD = 32, > + VHOST_USER_GET_MAX_MEM_SLOTS = 36, > + VHOST_USER_ADD_MEM_REG = 37, > + VHOST_USER_REM_MEM_REG = 38, > VHOST_USER_SET_STATUS = 39, > VHOST_USER_GET_STATUS = 40, > } VhostUserRequest; > @@ -91,6 +94,11 @@ typedef struct VhostUserMemory { > VhostUserMemoryRegion regions[VHOST_MEMORY_MAX_NREGIONS]; > } VhostUserMemory; > > +typedef struct VhostUserSingleMemReg { > + uint64_t padding; > + VhostUserMemoryRegion region; > +} VhostUserSingleMemReg; > + > typedef struct VhostUserLog { > uint64_t mmap_size; > uint64_t mmap_offset; > @@ -186,6 +194,7 @@ typedef struct __rte_packed_begin VhostUserMsg { > struct vhost_vring_state state; > struct vhost_vring_addr addr; > VhostUserMemory memory; > + VhostUserSingleMemReg memory_single; > VhostUserLog log; > struct vhost_iotlb_msg iotlb; > VhostUserCryptoSessionParam crypto_session; > -- > 2.43.0 > >
Reviewed-by: Maxime Coquelin <[email protected]> Thanks, Maxime

