DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Pravin M Bathija <pravin.bathija@dell.com>, dev@dpdk.org
Cc: pravin.m.bathija.dev@gmail.com
Subject: Re: [PATCH v5 2/4] vhost_user: header defines for add/rem mem region
Date: Tue, 6 Jan 2026 17:08:25 +0100	[thread overview]
Message-ID: <7de5dd70-45c2-4a76-954d-19beef994e5a@redhat.com> (raw)
In-Reply-To: <20251113124425.2913881-3-pravin.bathija@dell.com>



On 11/13/25 1:44 PM, Pravin M Bathija wrote:
> 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 | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
> index ef486545ba..5a0e747b58 100644
> --- a/lib/vhost/vhost_user.h
> +++ b/lib/vhost/vhost_user.h
> @@ -32,6 +32,7 @@
>   					 (1ULL << VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD) | \
>   					 (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
>   					 (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) | \
> +					 (1ULL << VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS) | \

It should be enabled only once the feature is actually implemented,
otherwise bisection may fail.

>   					 (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
>   
>   typedef enum VhostUserRequest {
> @@ -67,6 +68,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 +95,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 +195,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;


  reply	other threads:[~2026-01-06 16:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 12:44 [PATCH v5 0/4] Support add/remove memory region & get-max-slots Pravin M Bathija
2025-11-13 12:44 ` [PATCH v5 1/4] vhost: add user to mailmap and define to vhost hdr Pravin M Bathija
2026-01-06 15:46   ` Maxime Coquelin
2025-11-13 12:44 ` [PATCH v5 2/4] vhost_user: header defines for add/rem mem region Pravin M Bathija
2026-01-06 16:08   ` Maxime Coquelin [this message]
2025-11-13 12:44 ` [PATCH v5 3/4] vhost_user: support function defines for back-end Pravin M Bathija
2026-01-06 16:29   ` Maxime Coquelin
2025-11-13 12:44 ` [PATCH v5 4/4] vhost_user: Function defs for add/rem mem regions Pravin M Bathija
2026-01-06 16:36   ` Maxime Coquelin
  -- strict thread matches above, loose matches on Subject: below --
2025-11-13 12:42 [PATCH v5 0/4] Support add/remove memory region & get-max-slots Pravin M Bathija
2025-11-13 12:42 ` [PATCH v5 2/4] vhost_user: header defines for add/rem mem region Pravin M 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=7de5dd70-45c2-4a76-954d-19beef994e5a@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=pravin.bathija@dell.com \
    --cc=pravin.m.bathija.dev@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).