aboutsummaryrefslogtreecommitdiff
path: root/test/validation
diff options
context:
space:
mode:
authorVidya Sagar Velumuri <vvelumuri@marvell.com>2021-07-22 06:53:49 +0000
committerPetri Savolainen <petri.savolainen@nokia.com>2021-08-16 10:18:18 +0300
commit2718517ea83baf8cbe8a6fb85e86e378dd76ce89 (patch)
treeb931379fd47f393756c82974b609baeb6243e2a9 /test/validation
parentb56d5019233128f7e5b9283d908f01b9d5b7b2a8 (diff)
validation: ipsec: fix reassembly vector population
Move the test vectors to source file and declare them as extern in header file to avoid the creation of multiple instances of test vectors Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com> Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'test/validation')
-rw-r--r--test/validation/api/ipsec/Makefile.am3
-rw-r--r--test/validation/api/ipsec/reass_test_vectors.c353
-rw-r--r--test/validation/api/ipsec/reass_test_vectors.h362
3 files changed, 372 insertions, 346 deletions
diff --git a/test/validation/api/ipsec/Makefile.am b/test/validation/api/ipsec/Makefile.am
index 8417a5776..1a29d687d 100644
--- a/test/validation/api/ipsec/Makefile.am
+++ b/test/validation/api/ipsec/Makefile.am
@@ -7,7 +7,8 @@ libtestipsec_la_SOURCES = \
ipsec_test_in.c \
ipsec_test_out.c \
ipsec.h \
- ipsec.c
+ ipsec.c \
+ reass_test_vectors.c
test_PROGRAMS = \
ipsec_sync \
diff --git a/test/validation/api/ipsec/reass_test_vectors.c b/test/validation/api/ipsec/reass_test_vectors.c
new file mode 100644
index 000000000..c3bb2bfd4
--- /dev/null
+++ b/test/validation/api/ipsec/reass_test_vectors.c
@@ -0,0 +1,353 @@
+/* Copyright (c) 2021, Marvell
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "ipsec.h"
+
+/* The source file includes below test vectors */
+
+/* IPv6:
+ *
+ * 1) pkt_ipv6_udp_p1
+ * pkt_ipv6_udp_p1_f1
+ * pkt_ipv6_udp_p1_f2
+ *
+ * 2) pkt_ipv6_udp_p2
+ * pkt_ipv6_udp_p2_f1
+ * pkt_ipv6_udp_p2_f2
+ * pkt_ipv6_udp_p2_f3
+ * pkt_ipv6_udp_p2_f4
+ */
+
+/* IPv4:
+ *
+ * 1) pkt_ipv4_udp_p1
+ * pkt_ipv4_udp_p1_f1
+ * pkt_ipv4_udp_p1_f2
+ *
+ * 2) pkt_ipv4_udp_p2
+ * pkt_ipv4_udp_p2_f1
+ * pkt_ipv4_udp_p2_f2
+ * pkt_ipv4_udp_p2_f3
+ * pkt_ipv4_udp_p2_f4
+ */
+
+ipsec_test_packet pkt_ipv6_udp_p1 = {
+ .len = 1514,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 54,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x05, 0xb4, 0x11, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x05, 0xb4, 0x2b, 0xe8,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p1_f1 = {
+ .len = 1398,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x00, 0x01, 0x5c, 0x92, 0xac, 0xf1,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x05, 0xb4, 0x2b, 0xe8,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p1_f2 = {
+ .len = 186,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x00, 0x84, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x05, 0x38, 0x5c, 0x92, 0xac, 0xf1,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p2 = {
+ .len = 4496,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 54,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x11, 0x5a, 0x11, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x11, 0x5a, 0x8a, 0x11,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p2_f1 = {
+ .len = 1398,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x00, 0x01, 0x64, 0x6c, 0x68, 0x9f,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x11, 0x5a, 0x8a, 0x11,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p2_f2 = {
+ .len = 1398,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x05, 0x39, 0x64, 0x6c, 0x68, 0x9f,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p2_f3 = {
+ .len = 1398,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x0a, 0x71, 0x64, 0x6c, 0x68, 0x9f,
+ },
+};
+
+ipsec_test_packet pkt_ipv6_udp_p2_f4 = {
+ .len = 496,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 62,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
+
+ /* IP */
+ 0x60, 0x00, 0x00, 0x00, 0x01, 0xba, 0x2c, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
+ 0x11, 0x00, 0x0f, 0xa8, 0x64, 0x6c, 0x68, 0x9f,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p1 = {
+ .len = 1514,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x05, 0xdc, 0x00, 0x01, 0x00, 0x00,
+ 0x40, 0x11, 0x66, 0x0d, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x05, 0xc8, 0xb8, 0x4c,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p1_f1 = {
+ .len = 1434,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x05, 0x8c, 0x00, 0x01, 0x20, 0x00,
+ 0x40, 0x11, 0x46, 0x5d, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x05, 0xc8, 0xb8, 0x4c,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p1_f2 = {
+ .len = 114,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x00, 0x64, 0x00, 0x01, 0x00, 0xaf,
+ 0x40, 0x11, 0x6a, 0xd6, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p2 = {
+ .len = 4496,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x11, 0x82, 0x00, 0x02, 0x00, 0x00,
+ 0x40, 0x11, 0x5a, 0x66, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x11, 0x6e, 0x16, 0x76,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p2_f1 = {
+ .len = 1434,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x20, 0x00,
+ 0x40, 0x11, 0x46, 0x5c, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+
+ /* UDP */
+ 0x08, 0x00, 0x27, 0x10, 0x11, 0x6e, 0x16, 0x76,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p2_f2 = {
+ .len = 1434,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x20, 0xaf,
+ 0x40, 0x11, 0x45, 0xad, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p2_f3 = {
+ .len = 1434,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x21, 0x5e,
+ 0x40, 0x11, 0x44, 0xfe, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+ },
+};
+
+ipsec_test_packet pkt_ipv4_udp_p2_f4 = {
+ .len = 296,
+ .l2_offset = 0,
+ .l3_offset = 14,
+ .l4_offset = 34,
+ .data = {
+ /* ETH */
+ 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
+ 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
+
+ /* IP */
+ 0x45, 0x00, 0x01, 0x1a, 0x00, 0x02, 0x02, 0x0d,
+ 0x40, 0x11, 0x68, 0xc1, 0x0d, 0x00, 0x00, 0x02,
+ 0x02, 0x00, 0x00, 0x02,
+ },
+};
diff --git a/test/validation/api/ipsec/reass_test_vectors.h b/test/validation/api/ipsec/reass_test_vectors.h
index 4fbb1ebaf..02b41c573 100644
--- a/test/validation/api/ipsec/reass_test_vectors.h
+++ b/test/validation/api/ipsec/reass_test_vectors.h
@@ -7,351 +7,23 @@
#ifndef _ODP_REASS_TEST_VECTORS_H_
#define _ODP_REASS_TEST_VECTORS_H_
-/* The header file includes below test vectors */
-
-/* IPv6:
- *
- * 1) pkt_ipv6_udp_p1
- * pkt_ipv6_udp_p1_f1
- * pkt_ipv6_udp_p1_f2
- *
- * 2) pkt_ipv6_udp_p2
- * pkt_ipv6_udp_p2_f1
- * pkt_ipv6_udp_p2_f2
- * pkt_ipv6_udp_p2_f3
- * pkt_ipv6_udp_p2_f4
- */
-
-/* IPv4:
- *
- * 1) pkt_ipv4_udp_p1
- * pkt_ipv4_udp_p1_f1
- * pkt_ipv4_udp_p1_f2
- *
- * 2) pkt_ipv4_udp_p2
- * pkt_ipv4_udp_p2_f1
- * pkt_ipv4_udp_p2_f2
- * pkt_ipv4_udp_p2_f3
- * pkt_ipv4_udp_p2_f4
- */
-
-static ipsec_test_packet pkt_ipv6_udp_p1 = {
- .len = 1514,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 54,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x05, 0xb4, 0x11, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x05, 0xb4, 0x2b, 0xe8,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p1_f1 = {
- .len = 1398,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x00, 0x01, 0x5c, 0x92, 0xac, 0xf1,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x05, 0xb4, 0x2b, 0xe8,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p1_f2 = {
- .len = 186,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x84, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x05, 0x38, 0x5c, 0x92, 0xac, 0xf1,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p2 = {
- .len = 4496,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 54,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x11, 0x5a, 0x11, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x11, 0x5a, 0x8a, 0x11,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p2_f1 = {
- .len = 1398,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x00, 0x01, 0x64, 0x6c, 0x68, 0x9f,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x11, 0x5a, 0x8a, 0x11,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p2_f2 = {
- .len = 1398,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x05, 0x39, 0x64, 0x6c, 0x68, 0x9f,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p2_f3 = {
- .len = 1398,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x05, 0x40, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x0a, 0x71, 0x64, 0x6c, 0x68, 0x9f,
- },
-};
-
-static ipsec_test_packet pkt_ipv6_udp_p2_f4 = {
- .len = 496,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 62,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x86, 0xdd,
-
- /* IP */
- 0x60, 0x00, 0x00, 0x00, 0x01, 0xba, 0x2c, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x02,
- 0x11, 0x00, 0x0f, 0xa8, 0x64, 0x6c, 0x68, 0x9f,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p1 = {
- .len = 1514,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x05, 0xdc, 0x00, 0x01, 0x00, 0x00,
- 0x40, 0x11, 0x66, 0x0d, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x05, 0xc8, 0xb8, 0x4c,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p1_f1 = {
- .len = 1434,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x05, 0x8c, 0x00, 0x01, 0x20, 0x00,
- 0x40, 0x11, 0x46, 0x5d, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x05, 0xc8, 0xb8, 0x4c,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p1_f2 = {
- .len = 114,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x00, 0x64, 0x00, 0x01, 0x00, 0xaf,
- 0x40, 0x11, 0x6a, 0xd6, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p2 = {
- .len = 4496,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x11, 0x82, 0x00, 0x02, 0x00, 0x00,
- 0x40, 0x11, 0x5a, 0x66, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x11, 0x6e, 0x16, 0x76,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p2_f1 = {
- .len = 1434,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x20, 0x00,
- 0x40, 0x11, 0x46, 0x5c, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
-
- /* UDP */
- 0x08, 0x00, 0x27, 0x10, 0x11, 0x6e, 0x16, 0x76,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p2_f2 = {
- .len = 1434,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x20, 0xaf,
- 0x40, 0x11, 0x45, 0xad, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p2_f3 = {
- .len = 1434,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x05, 0x8c, 0x00, 0x02, 0x21, 0x5e,
- 0x40, 0x11, 0x44, 0xfe, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
- },
-};
-
-static ipsec_test_packet pkt_ipv4_udp_p2_f4 = {
- .len = 296,
- .l2_offset = 0,
- .l3_offset = 14,
- .l4_offset = 34,
- .data = {
- /* ETH */
- 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1,
- 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0x08, 0x00,
-
- /* IP */
- 0x45, 0x00, 0x01, 0x1a, 0x00, 0x02, 0x02, 0x0d,
- 0x40, 0x11, 0x68, 0xc1, 0x0d, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02,
- },
-};
+extern ipsec_test_packet pkt_ipv6_udp_p1;
+extern ipsec_test_packet pkt_ipv6_udp_p1_f1;
+extern ipsec_test_packet pkt_ipv6_udp_p1_f2;
+extern ipsec_test_packet pkt_ipv6_udp_p2;
+extern ipsec_test_packet pkt_ipv6_udp_p2_f1;
+extern ipsec_test_packet pkt_ipv6_udp_p2_f2;
+extern ipsec_test_packet pkt_ipv6_udp_p2_f3;
+extern ipsec_test_packet pkt_ipv6_udp_p2_f4;
+
+extern ipsec_test_packet pkt_ipv4_udp_p1;
+extern ipsec_test_packet pkt_ipv4_udp_p1_f1;
+extern ipsec_test_packet pkt_ipv4_udp_p1_f2;
+extern ipsec_test_packet pkt_ipv4_udp_p2;
+extern ipsec_test_packet pkt_ipv4_udp_p2_f1;
+extern ipsec_test_packet pkt_ipv4_udp_p2_f2;
+extern ipsec_test_packet pkt_ipv4_udp_p2_f3;
+extern ipsec_test_packet pkt_ipv4_udp_p2_f4;
static inline void
test_vector_payload_populate(ipsec_test_packet *pkt, odp_bool_t first_frag)