common/mlx5: fix default devargs initialization
[dpdk.git] / drivers / crypto / octeontx / otx_cryptodev_mbox.h
index b05d1c5..c1eedc1 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;
@@ -58,12 +70,18 @@ void
 otx_cpt_handle_mbox_intr(struct cpt_vf *cptvf);
 
 /*
- * Checks if VF is able to comminicate with PF
+ * Checks if VF is able to communicate with PF
  * and also gets the CPT number this VF is associated to.
  */
 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.