[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/15] block/nvme: Introduce Completion Queue definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/15] block/nvme: Introduce Completion Queue definitions |
Date: |
Wed, 14 Oct 2020 17:58:04 +0200 |
Rename Submission Queue flags with 'Sq' and introduce
Completion Queue flag definitions.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/block/nvme.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 65e68a82c89..079f884a2d3 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -491,6 +491,11 @@ typedef struct QEMU_PACKED NvmeCreateCq {
#define NVME_CQ_FLAGS_PC(cq_flags) (cq_flags & 0x1)
#define NVME_CQ_FLAGS_IEN(cq_flags) ((cq_flags >> 1) & 0x1)
+enum NvmeFlagsCq {
+ NVME_CQ_PC = 1,
+ NVME_CQ_IEN = 2,
+};
+
typedef struct QEMU_PACKED NvmeCreateSq {
uint8_t opcode;
uint8_t flags;
@@ -508,12 +513,12 @@ typedef struct QEMU_PACKED NvmeCreateSq {
#define NVME_SQ_FLAGS_PC(sq_flags) (sq_flags & 0x1)
#define NVME_SQ_FLAGS_QPRIO(sq_flags) ((sq_flags >> 1) & 0x3)
-enum NvmeQueueFlags {
- NVME_Q_PC = 1,
- NVME_Q_PRIO_URGENT = 0,
- NVME_Q_PRIO_HIGH = 1,
- NVME_Q_PRIO_NORMAL = 2,
- NVME_Q_PRIO_LOW = 3,
+enum NvmeFlagsSq {
+ NVME_SQ_PC = 1,
+ NVME_SQ_PRIO_URGENT = 0,
+ NVME_SQ_PRIO_HIGH = 1,
+ NVME_SQ_PRIO_NORMAL = 2,
+ NVME_SQ_PRIO_LOW = 3,
};
typedef struct QEMU_PACKED NvmeIdentify {
--
2.26.2
- [PATCH 00/15] block/nvme: Improve debugging experience and minor fixes, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 02/15] block/nvme: Trace nvme_poll_queue() per queue, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 01/15] block/nvme: Move nvme_poll_cb() earlier, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 03/15] block/nvme: Use unsigned integer for queue counter/size, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 04/15] block/nvme: Improve nvme_free_req_queue_wait() trace information, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 05/15] block/nvme: Trace queue pair creation/deletion, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 06/15] block/nvme: Make nvme_identify() return boolean indicating error, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 07/15] block/nvme: Make nvme_init_queue() return boolean indicating error, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 09/15] block/nvme: Introduce Completion Queue definitions,
Philippe Mathieu-Daudé <=
- [PATCH 10/15] block/nvme: Use definitions instead of magic values in add_io_queue(), Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 08/15] block/nvme: Pass AioContext argument to nvme_add_io_queue(), Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 12/15] block/nvme: Simplify device reset, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 11/15] block/nvme: Trace controller capabilities, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 13/15] block/nvme: Simplify ADMIN queue access, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 15/15] block/nvme: Set request_alignment at initialization, Philippe Mathieu-Daudé, 2020/10/14
- [PATCH 14/15] block/nvme: Report warning with warn_report(), Philippe Mathieu-Daudé, 2020/10/14