@@ -225,6 +225,7 @@ static int alg_packet_op(odp_packet_t pkt,
CU_ASSERT(ODP_EVENT_PACKET ==
odp_event_types(odp_packet_to_event(pkt), &subtype));
CU_ASSERT(ODP_EVENT_PACKET_CRYPTO == subtype);
+ CU_ASSERT(odp_packet_subtype(pkt) == ODP_EVENT_PACKET_CRYPTO);
rc = odp_crypto_result(&result, pkt);
if (rc < 0) {
@@ -298,6 +299,7 @@ static int alg_packet_op_enq(odp_packet_t pkt,
CU_ASSERT(ODP_EVENT_PACKET ==
odp_event_types(odp_packet_to_event(pkt), &subtype));
CU_ASSERT(ODP_EVENT_PACKET_CRYPTO == subtype);
+ CU_ASSERT(odp_packet_subtype(pkt) == ODP_EVENT_PACKET_CRYPTO);
rc = odp_crypto_result(&result, pkt);
if (rc < 0) {
@@ -502,6 +502,7 @@ static int ipsec_send_in_one(const ipsec_test_part *part,
pkto, &num_out,
¶m));
CU_ASSERT_EQUAL(num_out, part->out_pkt);
+ CU_ASSERT(odp_packet_subtype(*pkto) == ODP_EVENT_PACKET_IPSEC);
} else if (ODP_IPSEC_OP_MODE_ASYNC == suite_context.inbound_op_mode) {
CU_ASSERT_EQUAL(1, odp_ipsec_in_enq(&pkt, 1, ¶m));
@@ -517,6 +518,8 @@ static int ipsec_send_in_one(const ipsec_test_part *part,
odp_event_types(event, &subtype));
CU_ASSERT_EQUAL(ODP_EVENT_PACKET_IPSEC, subtype);
pkto[i] = odp_ipsec_packet_from_event(event);
+ CU_ASSERT(odp_packet_subtype(pkto[i]) ==
+ ODP_EVENT_PACKET_IPSEC);
}
} else {
odp_queue_t queue;
@@ -555,7 +558,10 @@ static int ipsec_send_in_one(const ipsec_test_part *part,
subtype);
CU_ASSERT(!part->out[i].status.error.sa_lookup);
- pkto[i++] = odp_ipsec_packet_from_event(ev);
+ pkto[i] = odp_ipsec_packet_from_event(ev);
+ CU_ASSERT(odp_packet_subtype(pkto[i]) ==
+ ODP_EVENT_PACKET_IPSEC);
+ i++;
continue;
}
}
@@ -586,6 +592,8 @@ static int ipsec_send_out_one(const ipsec_test_part *part,
pkto, &num_out,
¶m));
CU_ASSERT_EQUAL(num_out, part->out_pkt);
+ CU_ASSERT(odp_packet_subtype(*pkto) ==
+ ODP_EVENT_PACKET_IPSEC);
} else if (ODP_IPSEC_OP_MODE_ASYNC == suite_context.outbound_op_mode) {
CU_ASSERT_EQUAL(1, odp_ipsec_out_enq(&pkt, 1, ¶m));
@@ -601,6 +609,8 @@ static int ipsec_send_out_one(const ipsec_test_part *part,
odp_event_types(event, &subtype));
CU_ASSERT_EQUAL(ODP_EVENT_PACKET_IPSEC, subtype);
pkto[i] = odp_ipsec_packet_from_event(event);
+ CU_ASSERT(odp_packet_subtype(pkto[i]) ==
+ ODP_EVENT_PACKET_IPSEC);
}
} else {
struct odp_ipsec_out_inline_param_t inline_param;
@@ -657,7 +667,10 @@ static int ipsec_send_out_one(const ipsec_test_part *part,
subtype);
CU_ASSERT(part->out[i].status.error.all);
- pkto[i++] = odp_ipsec_packet_from_event(ev);
+ pkto[i] = odp_ipsec_packet_from_event(ev);
+ CU_ASSERT(odp_packet_subtype(pkto[i]) ==
+ ODP_EVENT_PACKET_IPSEC);
+ i++;
continue;
}
}
@@ -319,6 +319,7 @@ static void packet_test_alloc_free(void)
CU_ASSERT(odp_event_types(odp_packet_to_event(packet), &subtype) ==
ODP_EVENT_PACKET);
CU_ASSERT(subtype == ODP_EVENT_PACKET_BASIC);
+ CU_ASSERT(odp_packet_subtype(packet) == ODP_EVENT_PACKET_BASIC);
CU_ASSERT(odp_packet_to_u64(packet) !=
odp_packet_to_u64(ODP_PACKET_INVALID));
@@ -402,6 +403,8 @@ static void packet_test_alloc_free_multi(void)
&subtype) ==
ODP_EVENT_PACKET);
CU_ASSERT(subtype == ODP_EVENT_PACKET_BASIC);
+ CU_ASSERT(odp_packet_subtype(packet[i]) ==
+ ODP_EVENT_PACKET_BASIC);
CU_ASSERT(odp_packet_to_u64(packet[i]) !=
odp_packet_to_u64(ODP_PACKET_INVALID));