From 459af2f0d4c25d034d7fa1323ca6610247bd868a Mon Sep 17 00:00:00 2001 From: Young Tack Jin Date: Thu, 28 Jun 2018 10:39:10 -0700 Subject: [PATCH] ocssd: lba_status bit array on vector completion queue entry This can be tested with lb_err_write and ln_err_write of QEMU NVMe options Change-Id: I16672f015ed4fec1386d27b974f4cd6c88decdf9 Signed-off-by: Young Tack Jin Reviewed-on: https://review.gerrithub.io/417177 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- include/spdk/nvme_ocssd_spec.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/spdk/nvme_ocssd_spec.h b/include/spdk/nvme_ocssd_spec.h index 3660962c1..42c66eb2d 100644 --- a/include/spdk/nvme_ocssd_spec.h +++ b/include/spdk/nvme_ocssd_spec.h @@ -46,6 +46,7 @@ extern "C" { #endif #include "spdk/assert.h" +#include "spdk/nvme_spec.h" /** A maximum number of LBAs that can be issued by vector I/O commands */ #define SPDK_NVME_OCSSD_MAX_LBAL_ENTRIES 64 @@ -209,6 +210,23 @@ struct spdk_ocssd_chunk_information { }; SPDK_STATIC_ASSERT(sizeof(struct spdk_ocssd_chunk_information) == 32, "Incorrect size"); +/** + * Vector completion queue entry + */ +struct spdk_ocssd_vector_cpl { + /* dword 0,1 */ + uint64_t lba_status; /* completion status bit array */ + + /* dword 2 */ + uint16_t sqhd; /* submission queue head pointer */ + uint16_t sqid; /* submission queue identifier */ + + /* dword 3 */ + uint16_t cid; /* command identifier */ + struct spdk_nvme_status status; +}; +SPDK_STATIC_ASSERT(sizeof(struct spdk_ocssd_vector_cpl) == 16, "Incorrect size"); + /** * OCSSD admin command set opcodes */