#include <kunit/test.h>
#include <asm/checksum.h>
#include <net/ip6_checksum.h>
#define MAX_LEN …
#define MAX_ALIGN …
#define TEST_BUFLEN …
#define IPv4_MIN_WORDS …
#define IPv4_MAX_WORDS …
#define NUM_IPv6_TESTS …
#define NUM_IP_FAST_CSUM_TESTS …
static const u32 random_init_sum = …;
static const u8 random_buf[] = …;
static const u16 expected_results[] = …;
static const u32 init_sums_no_overflow[] = …;
static const u16 expected_csum_ipv6_magic[] = …;
static const u16 expected_fast_csum[] = …;
static u8 tmp_buf[TEST_BUFLEN];
#define full_csum(buff, len, sum) …
#define CHECK_EQ(lhs, rhs) …
static __sum16 to_sum16(u16 x)
{ … }
static __wsum to_wsum(u32 x)
{ … }
static void assert_setup_correct(struct kunit *test)
{ … }
static void test_csum_fixed_random_inputs(struct kunit *test)
{ … }
static void test_csum_all_carry_inputs(struct kunit *test)
{ … }
static void test_csum_no_carry_inputs(struct kunit *test)
{ … }
static void test_ip_fast_csum(struct kunit *test)
{ … }
static void test_csum_ipv6_magic(struct kunit *test)
{ … }
static struct kunit_case __refdata checksum_test_cases[] = …;
static struct kunit_suite checksum_test_suite = …;
kunit_test_suites(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;