qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Berg, John" <jhnberg@amazon.co.uk>
To: "its@irrelevant.dk" <its@irrelevant.dk>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	"foss@defmacro.it" <foss@defmacro.it>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Subject: Re: [PATCH] hw/nvme: Add support for setting the MQES for the NVMe emulation
Date: Mon, 8 Jul 2024 16:22:33 +0000	[thread overview]
Message-ID: <5039ce9596dd8a15450525cc7219ba7d70b054c6.camel@amazon.co.uk> (raw)
In-Reply-To: <ZjI3AOEZ4GzFdKTg@cormorant.local>

On Wed, 2024-05-01 at 14:35 +0200, Klaus Jensen wrote:
> On May  1 12:27, Berg, John wrote:
> > On Thu, 2024-04-04 at 15:01 +0200, Klaus Jensen wrote:
> > > On Apr  4 13:04, John Berg wrote:
> > > > From: John Berg <jhnberg@amazon.com>
> > > > 
> > > > The MQES field in the CAP register describes the Maximum Queue
> > > > Entries
> > > > Supported for the IO queues of an NVMe controller. Adding a +1
> > > > to
> > > > the
> > > > value in this field results in the total queue size. A full
> > > > queue
> > > > is
> > > > when a queue of size N contains N - 1 entries, and the minimum
> > > > queue
> > > > size is 2. Thus the lowest MQES value is 1.
> > > > 
> > > > This patch adds the new mqes property to the NVMe emulation
> > > > which
> > > > allows
> > > > a user to specify the maximum queue size by setting this
> > > > property.
> > > > This
> > > > is useful as it enables testing of NVMe controller where the
> > > > MQES
> > > > is
> > > > relatively small. The smallest NVMe queue size supported in
> > > > NVMe is
> > > > 2
> > > > submission and completion entries, which means that the
> > > > smallest
> > > > legal
> > > > mqes value is 1.
> > > > 
> > > > The following example shows how the mqes can be set for a the
> > > > NVMe
> > > > emulation:
> > > > 
> > > > -drive id=nvme0,if=none,file=nvme.img,format=raw
> > > > -device nvme,drive=nvme0,serial=foo,mqes=1
> > > > 
> > > > If the mqes property is not provided then the default mqes will
> > > > still be
> > > > 0x7ff (the queue size is 2048 entries).
> > > > 
> > > > Signed-off-by: John Berg <jhnberg@amazon.co.uk>
> > > > ---
> > > >  hw/nvme/ctrl.c | 9 ++++++++-
> > > >  hw/nvme/nvme.h | 1 +
> > > >  2 files changed, 9 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> > > > index 127c3d2383..86cda9bc73 100644
> > > > --- a/hw/nvme/ctrl.c
> > > > +++ b/hw/nvme/ctrl.c
> > > > @@ -7805,6 +7805,12 @@ static bool nvme_check_params(NvmeCtrl
> > > > *n,
> > > > Error **errp)
> > > >          return false;
> > > >      }
> > > >  
> > > > +    if (params->mqes < 1)
> > > > +    {
> > > 
> > > Please keep the `{` on the same line as the `if`. I think
> > > checkpatch.pl
> > > should catch this.
> > > 
> > > No need to send a v2, I'll fix it up when I apply it to nvme-next
> > > :)
> > > 
> > > Thanks!
> > 
> > 
> > Hello
> > 
> > Sorry for chasing. I was just wondering when this patch will be
> > applied. I can send a second revision if that helps.
> > 
> 
> No need for the sorry. My apologies. It feel off my radar, so thanks
> for
> the bump.
> 
> I've queued this on nvme-next, will send a pull for master ASAP.

Hello, just checking in again. Will this be merged into master soon?


  reply	other threads:[~2024-07-08 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 12:04 [PATCH] hw/nvme: Add support for setting the MQES for the NVMe emulation John Berg
2024-04-04 12:58 ` Klaus Jensen
2024-04-04 13:01 ` Klaus Jensen
2024-05-01 12:27   ` Berg, John
2024-05-01 12:35     ` Klaus Jensen
2024-07-08 16:22       ` Berg, John [this message]
2024-04-04 13:59 ` Keith Busch

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=5039ce9596dd8a15450525cc7219ba7d70b054c6.camel@amazon.co.uk \
    --to=jhnberg@amazon.co.uk \
    --cc=foss@defmacro.it \
    --cc=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).