@@ -203,6 +203,14 @@ static void packet_layer_offsets(void)
CU_ASSERT(l2_addr != l3_addr);
CU_ASSERT(l2_addr != l4_addr);
CU_ASSERT(l3_addr != l4_addr);
+
+ /* Set offsets back to invalid */
+ odp_packet_l2_offset_set(pkt, ODP_PACKET_OFFSET_INVALID);
+ CU_ASSERT(odp_packet_l2_offset(pkt) == ODP_PACKET_OFFSET_INVALID);
+ odp_packet_l3_offset_set(pkt, ODP_PACKET_OFFSET_INVALID);
+ CU_ASSERT(odp_packet_l3_offset(pkt) == ODP_PACKET_OFFSET_INVALID);
+ odp_packet_l4_offset_set(pkt, ODP_PACKET_OFFSET_INVALID);
+ CU_ASSERT(odp_packet_l4_offset(pkt) == ODP_PACKET_OFFSET_INVALID);
}
static void _verify_headroom_shift(odp_packet_t packet,
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- test/validation/buffer/odp_packet_test.c | 8 ++++++++ 1 file changed, 8 insertions(+)