From: fengchengwen <fengchengwen@huawei.com>
To: <pravin.bathija@dell.com>, <dev@dpdk.org>,
<stephen@networkplumber.org>, <maxime.coquelin@redhat.com>
Cc: <thomas@monjalon.net>
Subject: Re: [PATCH v12 2/5] vhost_user: header defines for add/rem mem region
Date: Wed, 13 May 2026 10:30:01 +0800 [thread overview]
Message-ID: <ef49146b-429f-484a-83b9-0ab3de0a28f1@huawei.com> (raw)
In-Reply-To: <20260506033733.972952-3-pravin.bathija@dell.com>
On 5/6/2026 11:37 AM, pravin.bathija@dell.com wrote:
> From: Pravin M Bathija <pravin.bathija@dell.com>
>
> 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 <pravin.bathija@dell.com>
> ---
> 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;
How about the same as qemu vhost define: VhostUserMemRegMsg
> +
> 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;
Suggest the same as qemu define: VhostUserMemRegMsg memreg;
> VhostUserLog log;
> struct vhost_iotlb_msg iotlb;
> VhostUserCryptoSessionParam crypto_session;
With above fix
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
next prev parent reply other threads:[~2026-05-13 2:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 3:37 [PATCH v12 0/5] Support add/remove memory region and get-max-slots pravin.bathija
2026-05-06 3:37 ` [PATCH v12 1/5] vhost: add user to mailmap and define to vhost hdr pravin.bathija
2026-05-13 2:22 ` fengchengwen
2026-05-06 3:37 ` [PATCH v12 2/5] vhost_user: header defines for add/rem mem region pravin.bathija
2026-05-13 2:30 ` fengchengwen [this message]
2026-05-14 2:05 ` Bathija, Pravin
2026-05-06 3:37 ` [PATCH v12 3/5] vhost_user: support function defines for back-end pravin.bathija
2026-05-06 3:37 ` [PATCH v12 4/5] vhost_user: Function defs for add/rem mem regions pravin.bathija
2026-05-13 4:16 ` fengchengwen
2026-05-14 2:07 ` Bathija, Pravin
2026-05-06 3:37 ` [PATCH v12 5/5] vhost_user: enable configure memory slots pravin.bathija
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef49146b-429f-484a-83b9-0ab3de0a28f1@huawei.com \
--to=fengchengwen@huawei.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=pravin.bathija@dell.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox