]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
RDMA/core: introduce check masks for T10-PI offload
authorMax Gurtovoy <maxg@mellanox.com>
Thu, 31 May 2018 08:05:24 +0000 (11:05 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Jun 2018 15:19:24 +0000 (09:19 -0600)
T10-PI offload capability is currently supported in iSER protocol only,
and the definition of the HCA protection information checks are missing
from the core layer. Add those definition to avoid code duplication in
other drivers (such iSER target and NVMeoF).

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/rdma/ib_verbs.h

index 2cc04abb6df8db6bce9f1ef56eea8eb23f97b8a4..2043e1a8f851aee28579436d1d34d4d959b78fbd 100644 (file)
@@ -860,6 +860,19 @@ enum ib_sig_err_type {
        IB_SIG_BAD_APPTAG,
 };
 
+/**
+ * Signature check masks (8 bytes in total) according to the T10-PI standard:
+ *  -------- -------- ------------
+ * | GUARD  | APPTAG |   REFTAG   |
+ * |  2B    |  2B    |    4B      |
+ *  -------- -------- ------------
+ */
+enum {
+       IB_SIG_CHECK_GUARD      = 0xc0,
+       IB_SIG_CHECK_APPTAG     = 0x30,
+       IB_SIG_CHECK_REFTAG     = 0x0f,
+};
+
 /**
  * struct ib_sig_err - signature error descriptor
  */