crypto/cnxk: support AH mode
[dpdk.git] / drivers / crypto / cnxk / cn10k_ipsec.c
index 0edc7c3..0c9e244 100644 (file)
@@ -74,7 +74,7 @@ cn10k_ipsec_outb_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf,
                if (crypto_xfrm->type == RTE_CRYPTO_SYM_XFORM_AEAD) {
                        sa->iv_offset = crypto_xfrm->aead.iv.offset;
                        sa->iv_length = crypto_xfrm->aead.iv.length;
-               } else {
+               } else if (crypto_xfrm->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
                        sa->iv_offset = crypto_xfrm->cipher.iv.offset;
                        sa->iv_length = crypto_xfrm->cipher.iv.length;
                }
@@ -182,7 +182,8 @@ cn10k_ipsec_inb_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf,
        }
 
        /* Translate security parameters to SA */
-       ret = cnxk_ot_ipsec_inb_sa_fill(sa_dptr, ipsec_xfrm, crypto_xfrm);
+       ret = cnxk_ot_ipsec_inb_sa_fill(sa_dptr, ipsec_xfrm, crypto_xfrm,
+                                       false);
        if (ret) {
                plt_err("Could not fill inbound session parameters");
                goto sa_dptr_free;