]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/drivers/crypto/octeontx/otx_cryptodev_mbox.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / crypto / octeontx / otx_cryptodev_mbox.h
index b05d1c50d52450120b77bd30d6307a3dfbe8c8a5..508f3afd47f879c4ab253d0f268f960a3c0ec376 100644 (file)
 
 #define OTX_CPT_MBOX_MSG_TIMEOUT    2000 /* In Milli Seconds */
 
-#define OTX_CPT_MBOX_MSG_TYPE_REQ      0
-#define OTX_CPT_MBOX_MSG_TYPE_ACK      1
-#define OTX_CPT_MBOX_MSG_TYPE_NACK     2
-#define OTX_CPT_MBOX_MSG_TYPE_NOP      3
-
 /* CPT mailbox structure */
 struct cpt_mbox {
        /** Message type MBOX[0] */
@@ -28,7 +23,22 @@ struct cpt_mbox {
        uint64_t data;
 };
 
-typedef enum {
+/* CPT PF types */
+enum otx_cpt_pf_type {
+       OTX_CPT_PF_TYPE_INVALID = 0,
+       OTX_CPT_PF_TYPE_AE = 2,
+       OTX_CPT_PF_TYPE_SE,
+};
+
+/* CPT VF types */
+enum otx_cpt_vf_type {
+       OTX_CPT_VF_TYPE_AE = 1,
+       OTX_CPT_VF_TYPE_SE,
+       OTX_CPT_VF_TYPE_INVALID,
+};
+
+/* PF-VF message opcodes */
+enum otx_cpt_mbox_opcode {
        OTX_CPT_MSG_VF_UP = 1,
        OTX_CPT_MSG_VF_DOWN,
        OTX_CPT_MSG_READY,
@@ -36,7 +46,9 @@ typedef enum {
        OTX_CPT_MSG_QBIND_GRP,
        OTX_CPT_MSG_VQ_PRIORITY,
        OTX_CPT_MSG_PF_TYPE,
-} otx_cpt_mbox_opcode_t;
+       OTX_CPT_MBOX_MSG_TYPE_ACK,
+       OTX_CPT_MBOX_MSG_TYPE_NACK
+};
 
 typedef union {
        uint64_t u64;
@@ -64,6 +76,12 @@ otx_cpt_handle_mbox_intr(struct cpt_vf *cptvf);
 int
 otx_cpt_check_pf_ready(struct cpt_vf *cptvf);
 
+/*
+ * Communicate to PF to get VF type
+ */
+int
+otx_cpt_get_dev_type(struct cpt_vf *cptvf);
+
 /*
  * Communicate VQs size to PF to program CPT(0)_PF_Q(0-15)_CTL of the VF.
  * Must be ACKed.