return test_ipsec_proto_all(&flags);
}
+static int
+test_ipsec_proto_pkt_fragment(const void *data __rte_unused)
+{
+ struct ipsec_test_flags flags;
+
+ memset(&flags, 0, sizeof(flags));
+
+ flags.fragment = true;
+
+ return test_ipsec_proto_all(&flags);
+}
+
static int
test_PDCP_PROTO_all(void)
{
"Statistics: success",
ut_setup_security, ut_teardown,
test_ipsec_proto_stats),
+ TEST_CASE_NAMED_ST(
+ "Fragmented packet",
+ ut_setup_security, ut_teardown,
+ test_ipsec_proto_pkt_fragment),
TEST_CASES_END() /**< NULL terminate unit test array */
}
};
if (flags->stats_success)
td->ipsec_xform.options.stats = 1;
+ if (flags->fragment) {
+ struct rte_ipv4_hdr *ip;
+ ip = (struct rte_ipv4_hdr *)&td->input_text.data;
+ ip->fragment_offset = 4;
+ ip->hdr_checksum = rte_ipv4_cksum(ip);
+ }
+
}
}