From: Anoob Joseph Date: Tue, 28 Sep 2021 10:59:56 +0000 (+0530) Subject: crypto/octeontx2: add checks for life configuration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=30ce834f2c21fd901761234db70606fa599e76c4;p=dpdk.git crypto/octeontx2: add checks for life configuration Lifetime tracking is not supported by hardware and is not implemented in software either. Return failure when lifetime is configured. Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- diff --git a/drivers/crypto/octeontx2/otx2_ipsec_po.h b/drivers/crypto/octeontx2/otx2_ipsec_po.h index b3e7456551..b61c5e0c04 100644 --- a/drivers/crypto/octeontx2/otx2_ipsec_po.h +++ b/drivers/crypto/octeontx2/otx2_ipsec_po.h @@ -293,6 +293,12 @@ ipsec_po_xform_verify(struct rte_security_ipsec_xform *ipsec, struct rte_crypto_sym_xform *auth_xform, *cipher_xform; int ret; + if (ipsec->life.bytes_hard_limit != 0 || + ipsec->life.bytes_soft_limit != 0 || + ipsec->life.packets_hard_limit != 0 || + ipsec->life.packets_soft_limit != 0) + return -ENOTSUP; + if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) return ipsec_po_xform_aead_verify(ipsec, xform);