common/cnxk: add err ctl in SA
[dpdk.git] / drivers / common / cnxk / roc_ie_ot.h
index 1ff4688..c502c79 100644 (file)
 #define ROC_IE_OT_MAJOR_OP_PROCESS_OUTBOUND_IPSEC 0x28UL
 #define ROC_IE_OT_MAJOR_OP_PROCESS_INBOUND_IPSEC  0x29UL
 
+#define ROC_IE_OT_MAJOR_OP_WRITE_SA 0x01UL
+#define ROC_IE_OT_MINOR_OP_WRITE_SA 0x09UL
+
+#define ROC_IE_OT_CTX_ILEN 2
+
 enum roc_ie_ot_ucc_ipsec {
        ROC_IE_OT_UCC_SUCCESS = 0x00,
        ROC_IE_OT_UCC_ERR_SA_INVAL = 0xb0,
@@ -38,8 +43,8 @@ enum roc_ie_ot_ucc_ipsec {
        ROC_IE_OT_UCC_ERR_SA_ESP_BAD_KEYS = 0xc5,
        ROC_IE_OT_UCC_ERR_SA_AH_BAD_KEYS = 0xc6,
        ROC_IE_OT_UCC_ERR_SA_BAD_IP = 0xc7,
-       ROC_IE_OT_UCC_ERR_PKT_REPLAY_WINDOW = 0xc8,
-       ROC_IE_OT_UCC_ERR_PKT_IP_FRAG = 0xc9,
+       ROC_IE_OT_UCC_ERR_PKT_IP_FRAG = 0xc8,
+       ROC_IE_OT_UCC_ERR_PKT_REPLAY_WINDOW = 0xc9,
        ROC_IE_OT_UCC_SUCCESS_SA_SOFTEXP_FIRST = 0xf0,
        ROC_IE_OT_UCC_SUCCESS_PKT_IP_BADCSUM = 0xf1,
        ROC_IE_OT_UCC_SUCCESS_SA_SOFTEXP_AGAIN = 0xf2,
@@ -148,6 +153,13 @@ enum {
        ROC_IE_OT_REAS_STS_L3P_ERR = 8,
        ROC_IE_OT_REAS_STS_MAX = 9
 };
+
+enum {
+       ROC_IE_OT_ERR_CTL_MODE_NONE = 0,
+       ROC_IE_OT_ERR_CTL_MODE_CLEAR = 1,
+       ROC_IE_OT_ERR_CTL_MODE_RING = 2,
+};
+
 /* Context units in bytes */
 #define ROC_CTX_UNIT_8B                  8
 #define ROC_CTX_UNIT_128B        128
@@ -180,7 +192,11 @@ union roc_ot_ipsec_sa_word2 {
                uint64_t auth_type : 4;
 
                uint64_t encap_type : 2;
-               uint64_t rsvd1 : 6;
+               uint64_t et_ovrwr_ddr_en : 1;
+               uint64_t esn_en : 1;
+               uint64_t tport_l4_incr_csum : 1;
+               uint64_t ip_hdr_verify : 2;
+               uint64_t udp_ports_verify : 1;
 
                uint64_t rsvd2 : 7;
                uint64_t async_mode : 1;
@@ -226,7 +242,15 @@ union roc_ot_ipsec_outb_iv {
 };
 
 struct roc_ot_ipsec_outb_ctx_update_reg {
-       uint64_t rsvd;
+       union {
+               struct {
+                       uint64_t reserved_0_2 : 3;
+                       uint64_t address : 57;
+                       uint64_t mode : 4;
+               } s;
+               uint64_t u64;
+       } err_ctl;
+
        uint64_t esn_val;
        uint64_t hard_life;
        uint64_t soft_life;
@@ -325,7 +349,7 @@ struct roc_ot_ipsec_inb_sa {
                        uint64_t esn_en : 1;
                        uint64_t tport_l4_incr_csum : 1;
                        uint64_t ip_hdr_verify : 2;
-                       uint64_t rsvd5 : 1;
+                       uint64_t udp_ports_verify : 1;
 
                        uint64_t rsvd6 : 7;
                        uint64_t async_mode : 1;