diff mbox series

[v1,4/13] validation: packet: verify odp_packet_l2_type()

Message ID 1519923609-31634-5-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v1,1/13] linux-gen: packet: implement packet l3/l4 proto types | expand

Commit Message

Github ODP bot March 1, 2018, 5 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 505 (muvarov:devel/master_merge_api-next)
 ** https://github.com/Linaro/odp/pull/505
 ** Patch: https://github.com/Linaro/odp/pull/505.patch
 ** Base sha: 284f52d72ec19df3774c7409780f1f9eea33b8e6
 ** Merge commit sha: e8f50fefcd57a92e0971dc1172c5402c56b8370a
 **/
 test/validation/api/packet/packet.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c
index 2ed801640..e2425fc0c 100644
--- a/test/validation/api/packet/packet.c
+++ b/test/validation/api/packet/packet.c
@@ -2605,6 +2605,8 @@  static void parse_eth_ipv4_udp(void)
 		CU_ASSERT(odp_packet_has_udp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv6(pkt[i]));
 		CU_ASSERT(!odp_packet_has_tcp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV4);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -2676,6 +2678,8 @@  static void parse_eth_ipv4_tcp(void)
 		CU_ASSERT(odp_packet_has_tcp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv6(pkt[i]));
 		CU_ASSERT(!odp_packet_has_udp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV4);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -2802,6 +2806,8 @@  static void parse_eth_vlan_ipv6_udp(void)
 		CU_ASSERT(odp_packet_has_udp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv4(pkt[i]));
 		CU_ASSERT(!odp_packet_has_tcp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV6);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -3056,6 +3062,8 @@  static void parse_eth_ipv6_ipsec_ah(void)
 		CU_ASSERT(!odp_packet_has_ipv4(pkt[i]));
 		CU_ASSERT(!odp_packet_has_tcp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_udp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV6);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),