@@ -55,6 +55,7 @@ typedef union {
uint32_t tcp_err:1; /**< TCP error, checks TBD */
uint32_t udp_err:1; /**< UDP error, checks TBD */
uint32_t l4_chksum:1; /**< L4 checksum error */
+ uint32_t crypto_err:1; /**< Crypto packet operation error */
};
} error_flags_t;
@@ -1161,6 +1161,7 @@ int odp_crypto_int(odp_packet_t pkt_in,
odp_bool_t allocated = false;
odp_packet_t out_pkt = *pkt_out;
odp_crypto_packet_result_t *op_result;
+ odp_packet_hdr_t *pkt_hdr;
session = (odp_crypto_generic_session_t *)(intptr_t)param->session;
@@ -1214,6 +1215,9 @@ int odp_crypto_int(odp_packet_t pkt_in,
(rc_cipher == ODP_CRYPTO_ALG_ERR_NONE) &&
(rc_auth == ODP_CRYPTO_ALG_ERR_NONE);
+ pkt_hdr = odp_packet_hdr(out_pkt);
+ pkt_hdr->p.error_flags.crypto_err = !op_result->ok;
+
/* Synchronous, simply return results */
*pkt_out = out_pkt;