DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Bathija, Pravin" <Pravin.Bathija@dell.com>
To: Maxime Coquelin <mcoqueli@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"pravin.m.bathija.dev@gmail.com" <pravin.m.bathija.dev@gmail.com>
Subject: RE: [PATCH v2 3/6] vhost: hdr file changes for add/remove mem regions
Date: Tue, 4 Nov 2025 04:25:41 +0000	[thread overview]
Message-ID: <SJ0PR19MB460607597ED0B6A443FFAC2CF5C4A@SJ0PR19MB4606.namprd19.prod.outlook.com> (raw)
In-Reply-To: <CAO55cswN99fw=OMjOuq_TKBTHNPHcMJEbgAqjsTEX-1FR8zYFA@mail.gmail.com>

Dear Maxime,

Answers inline.


Internal Use - Confidential
> -----Original Message-----
> From: Maxime Coquelin <mcoqueli@redhat.com>
> Sent: Wednesday, October 15, 2025 12:37 AM
> To: Bathija, Pravin <Pravin.Bathija@dell.com>
> Cc: dev@dpdk.org; pravin.m.bathija.dev@gmail.com
> Subject: Re: [PATCH v2 3/6] vhost: hdr file changes for add/remove mem
> regions
>
>
> [EXTERNAL EMAIL]
>
> On Wed, Oct 8, 2025 at 11:05 AM Pravin M Bathija <pravin.bathija@dell.com>
> wrote:
> >
> > * add enums to vhost user request for add/remove
> >   memory region support
> > * data structure that defines single memory region
> > * increase max memory regions from 8 to 128
> > * 128 add/remove regions tested with qemu virtio with
> >   testpmd vhost.
>
> The commit message has to be full sentences, explaining the changes but more
> importantly the purpose of the patch.
>
> For the title, it should not contain variable names or abbreviations.
>
> This comment applies here and to other patches of the series.
>

I have made the changes as you suggested  in the latest patch-set I sent over.

> > Signed-off-By: Pravin M Bathija <pravin.bathija@dell.com>
> > ---
> >  lib/vhost/vhost_user.h | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h index
> > ef486545ba..c6ad5b76d6 100644
> > --- a/lib/vhost/vhost_user.h
> > +++ b/lib/vhost/vhost_user.h
> > @@ -11,7 +11,7 @@
> >
> >  /* refer to hw/virtio/vhost-user.c */
> >
> > -#define VHOST_MEMORY_MAX_NREGIONS 8
> > +#define VHOST_MEMORY_MAX_NREGIONS 128
> >
> >  #define VHOST_USER_NET_SUPPORTED_FEATURES \
> >         (VIRTIO_NET_SUPPORTED_FEATURES | \ @@ -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 only be enabled once the feature works, so likely as the last patch of
> this series.
I have sent out the patch for increasing number of memory regions as last patch in the patch-set as you suggest.

>
> >                                          (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;
> > --
> > 2.43.0
> >


  reply	other threads:[~2025-11-04  4:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  9:04 [PATCH v2 0/6] Add/Remove memory regions & support funcs Pravin M Bathija
2025-10-08  9:04 ` [PATCH v2 1/6] vhost: add define for configure mem slot Pravin M Bathija
2025-10-15  7:32   ` Maxime Coquelin
2025-10-31 13:28   ` Thomas Monjalon
2025-11-04  4:27     ` Bathija, Pravin
2025-10-08  9:04 ` [PATCH v2 2/6] virtio: increase number of mem regions to 128 Pravin M Bathija
2025-10-08  9:04 ` [PATCH v2 3/6] vhost: hdr file changes for add/remove mem regions Pravin M Bathija
2025-10-15  7:36   ` Maxime Coquelin
2025-11-04  4:25     ` Bathija, Pravin [this message]
2025-10-08  9:04 ` [PATCH v2 4/6] vhost: add/remove memory region function defines Pravin M Bathija
2025-10-08  9:04 ` [PATCH v2 5/6] vhost: support functions for memory region ops Pravin M Bathija
2025-10-08  9:04 ` [PATCH v2 6/6] vhost: changes to function set_mem_table 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=SJ0PR19MB460607597ED0B6A443FFAC2CF5C4A@SJ0PR19MB4606.namprd19.prod.outlook.com \
    --to=pravin.bathija@dell.com \
    --cc=dev@dpdk.org \
    --cc=mcoqueli@redhat.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).