PMD_INIT_FUNC_TRACE();
+ if (ipsec_xform->life.bytes_hard_limit != 0 ||
+ ipsec_xform->life.bytes_soft_limit != 0 ||
+ ipsec_xform->life.packets_hard_limit != 0 ||
+ ipsec_xform->life.packets_soft_limit != 0)
+ return -ENOTSUP;
+
if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
cipher_xform = &conf->crypto_xform->cipher;
auth_xform = &conf->crypto_xform->next->auth;
session->encap_pdb.options =
(IPVERSION << PDBNH_ESP_ENCAP_SHIFT) |
PDBOPTS_ESP_OIHI_PDB_INL |
- PDBOPTS_ESP_IVSRC |
- PDBHMO_ESP_ENCAP_DTTL;
+ PDBOPTS_ESP_IVSRC;
+ if (ipsec_xform->options.dec_ttl)
+ session->encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL;
if (ipsec_xform->options.esn)
session->encap_pdb.options |= PDBOPTS_ESP_ESN;
session->encap_pdb.spi = ipsec_xform->spi;