Skip to content

Commit

Permalink
test/crypto: add L4 checksum case for transport mode
Browse files Browse the repository at this point in the history
Added test case to verify L4 checksum offload in IPsec transport mode.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
  • Loading branch information
f0rget-the-sad authored and Akhil Goyal committed Feb 23, 2022
1 parent 42902e8 commit 5816147
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/test/test_cryptodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -9724,6 +9724,17 @@ test_ipsec_proto_transport_v4(const void *data __rte_unused)
return test_ipsec_proto_all(&flags);
}

static int
test_ipsec_proto_transport_l4_csum(const void *data __rte_unused)
{
struct ipsec_test_flags flags = {
.l4_csum = true,
.transport = true,
};

return test_ipsec_proto_all(&flags);
}

static int
test_ipsec_proto_stats(const void *data __rte_unused)
{
Expand Down Expand Up @@ -15096,6 +15107,10 @@ static struct unit_test_suite ipsec_proto_testsuite = {
"Transport IPv4",
ut_setup_security, ut_teardown,
test_ipsec_proto_transport_v4),
TEST_CASE_NAMED_ST(
"Transport l4 checksum",
ut_setup_security, ut_teardown,
test_ipsec_proto_transport_l4_csum),
TEST_CASE_NAMED_ST(
"Statistics: success",
ut_setup_security, ut_teardown,
Expand Down

0 comments on commit 5816147

Please sign in to comment.