qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 4/5] nvme: updated shared header for copy command


From: Klaus Jensen
Subject: Re: [PATCH v5 4/5] nvme: updated shared header for copy command
Date: Wed, 3 Feb 2021 19:55:43 +0100

On Feb  3 09:21, Keith Busch wrote:
> On Fri, Jan 29, 2021 at 10:15:40AM +0100, Klaus Jensen wrote:
> > From: Klaus Jensen <k.jensen@samsung.com>
> > 
> > Add new data structures and types for the Simple Copy command.
> > 
> > Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> > Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
> > Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  include/block/nvme.h | 45 ++++++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 43 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/block/nvme.h b/include/block/nvme.h
> > index e4b918064df9..5977bcf0308a 100644
> > --- a/include/block/nvme.h
> > +++ b/include/block/nvme.h
> > @@ -579,6 +579,7 @@ enum NvmeIoCommands {
> >      NVME_CMD_COMPARE            = 0x05,
> >      NVME_CMD_WRITE_ZEROES       = 0x08,
> >      NVME_CMD_DSM                = 0x09,
> > +    NVME_CMD_COPY               = 0x19,
> >      NVME_CMD_ZONE_MGMT_SEND     = 0x79,
> >      NVME_CMD_ZONE_MGMT_RECV     = 0x7a,
> >      NVME_CMD_ZONE_APPEND        = 0x7d,
> > @@ -724,6 +725,35 @@ typedef struct QEMU_PACKED NvmeDsmRange {
> >      uint64_t    slba;
> >  } NvmeDsmRange;
> >  
> > +enum {
> > +    NVME_COPY_FORMAT_0 = 0x0,
> > +};
> > +
> > +typedef struct NvmeCopyCmd {
> > +    uint8_t     opcode;
> > +    uint8_t     flags;
> > +    uint16_t    cid;
> > +    uint32_t    nsid;
> > +    uint32_t    rsvd2[4];
> > +    NvmeCmdDptr dptr;
> > +    uint64_t    sdlba;
> > +    uint32_t    cdw12;
> > +    uint32_t    cdw13;
> 
> Can we find better names for the fields within cdw's 12 and 13?
> Something like:
> 
>     uint8_t nr;
>     uint8_t control[3];
>     uint16_t rsvd13;
>     uint16_t dspec;
> 

Absolutely.

I honestly didn't think about doing an array-3 of those control bytes.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]