@@ -605,6 +605,7 @@ static ipsec_sa_t *ipsec_in_single(odp_packet_t pkt,
odp_crypto_packet_op_param_t param;
int rc;
odp_crypto_packet_result_t crypto; /**< Crypto operation result */
+ odp_packet_parse_param_t parse_param;
odp_packet_hdr_t *pkt_hdr;
state.ip_offset = odp_packet_l3_offset(pkt);
@@ -770,15 +771,15 @@ static ipsec_sa_t *ipsec_in_single(odp_packet_t pkt,
goto err;
}
- pkt_hdr = odp_packet_hdr(pkt);
-
- packet_parse_reset(pkt_hdr);
+ parse_param.proto = state.is_ipv4 ?
+ ODP_PROTO_IPV4:
+ ODP_PROTO_IPV6;
+ parse_param.layer = ipsec_config.inbound.parse;
+ parse_param.chksums = ipsec_config.inbound.chksums;
- packet_parse_l3_l4(pkt_hdr, parse_layer(ipsec_config.inbound.parse),
- state.ip_offset,
- state.is_ipv4 ?
- _ODP_ETHTYPE_IPV4 :
- _ODP_ETHTYPE_IPV6);
+ /* We do not care about return code here.
+ * Parsing error should not result in IPsec error. */
+ odp_packet_parse(pkt, state.ip_offset, &parse_param);
*pkt_out = pkt;