summary refs log tree commit diff stats
path: root/hw/nvme/dif.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nvme/dif.h')
-rw-r--r--hw/nvme/dif.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/nvme/dif.h b/hw/nvme/dif.h
index e36fea30e7..ab6dbb0946 100644
--- a/hw/nvme/dif.h
+++ b/hw/nvme/dif.h
@@ -37,6 +37,11 @@ static const uint16_t t10_dif_crc_table[256] = {
     0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, 0xC96A, 0xDE04, 0x55B3
 };
 
+static inline size_t nvme_pi_tuple_size(NvmeNamespace *ns)
+{
+    return sizeof(NvmeDifTuple);
+}
+
 uint16_t nvme_check_prinfo(NvmeNamespace *ns, uint8_t prinfo, uint64_t slba,
                            uint32_t reftag);
 uint16_t nvme_dif_mangle_mdata(NvmeNamespace *ns, uint8_t *mbuf, size_t mlen,