Re: [PATCH v6 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests

From: Guenter Roeck
Date: Wed Feb 07 2024 - 21:45:47 EST


On Wed, Feb 07, 2024 at 04:22:51PM -0800, Charlie Jenkins wrote:
> The test cases for ip_fast_csum and csum_ipv6_magic were using arbitrary
> alignment of data to iterate through random inputs. ip_fast_csum should
> have the data aligned along (14 + NET_IP_ALIGN) bytes and
> csum_ipv6_magic should have data aligned along 32-bit boundaries.
>
> While this is being changed, fix up the awkward offset code in
> test_csum_ipv6_magic and use a struct instead.
>
> Signed-off-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
> Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum")
> ---
[ ... ]
> @@ -639,3 +526,4 @@ kunit_test_suites(&checksum_test_suite);
>
> MODULE_AUTHOR("Noah Goldstein <goldstein.w.n@xxxxxxxxx>");
> MODULE_LICENSE("GPL");
> +

git doesn't like the new extra empty line at the end.

Guenter