aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example/ipsec_crypto/odp_ipsec.c18
-rw-r--r--example/ipsec_crypto/odp_ipsec_misc.h18
2 files changed, 6 insertions, 30 deletions
diff --git a/example/ipsec_crypto/odp_ipsec.c b/example/ipsec_crypto/odp_ipsec.c
index c5dd7398e..dc56d671d 100644
--- a/example/ipsec_crypto/odp_ipsec.c
+++ b/example/ipsec_crypto/odp_ipsec.c
@@ -714,12 +714,9 @@ pkt_disposition_e do_ipsec_in_finish(odp_packet_t pkt,
odp_crypto_result(&result, pkt);
/* Check crypto result */
- if (!result.ok) {
- if (!is_crypto_op_status_ok(&result.cipher_status))
- return PKT_DROP;
- if (!is_crypto_op_status_ok(&result.auth_status))
- return PKT_DROP;
- }
+ if (!result.ok)
+ return PKT_DROP;
+
ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
/*
@@ -1025,12 +1022,9 @@ pkt_disposition_e do_ipsec_out_finish(odp_packet_t pkt,
odp_crypto_result(&result, pkt);
/* Check crypto result */
- if (!result.ok) {
- if (!is_crypto_op_status_ok(&result.cipher_status))
- return PKT_DROP;
- if (!is_crypto_op_status_ok(&result.auth_status))
- return PKT_DROP;
- }
+ if (!result.ok)
+ return PKT_DROP;
+
ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
/* Finalize the IPv4 header */
diff --git a/example/ipsec_crypto/odp_ipsec_misc.h b/example/ipsec_crypto/odp_ipsec_misc.h
index 6186a2369..9f9985c57 100644
--- a/example/ipsec_crypto/odp_ipsec_misc.h
+++ b/example/ipsec_crypto/odp_ipsec_misc.h
@@ -321,24 +321,6 @@ void ipv4_adjust_len(odph_ipv4hdr_t *ip, int adj)
ip->tot_len = odp_cpu_to_be_16(odp_be_to_cpu_16(ip->tot_len) + adj);
}
-/**
- * Verify crypto operation completed successfully
- *
- * @param status Pointer to cryto completion structure
- *
- * @return TRUE if all OK else FALSE
- */
-static inline
-odp_bool_t is_crypto_op_status_ok(odp_crypto_op_status_t *status)
-{
- if (status->alg_err != ODP_CRYPTO_ALG_ERR_NONE)
- return FALSE;
- if (status->hw_err != ODP_CRYPTO_HW_ERR_NONE)
- return FALSE;
- return TRUE;
-}
-
-
#ifdef __cplusplus
}
#endif