[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ae930a7-3b10-4470-94ee-89cb650b3349@csgroup.eu>
Date: Mon, 26 Feb 2024 11:34:51 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Charlie Jenkins <charlie@...osinc.com>, Guenter Roeck
<linux@...ck-us.net>, David Laight <David.Laight@...lab.com>, Palmer Dabbelt
<palmer@...belt.com>, Andrew Morton <akpm@...ux-foundation.org>, Helge Deller
<deller@....de>, "James E.J. Bottomley"
<James.Bottomley@...senpartnership.com>, Parisc List
<linux-parisc@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Palmer
Dabbelt <palmer@...osinc.com>, Linux ARM
<linux-arm-kernel@...ts.infradead.org>, Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum
and csum_ipv6_magic tests
Le 23/02/2024 à 23:11, Charlie Jenkins a écrit :
> The test cases for ip_fast_csum and csum_ipv6_magic were not properly
> aligning the IP header, which were causing failures on architectures
> that do not support misaligned accesses like some ARM platforms. To
> solve this, align the data along (14 + NET_IP_ALIGN) bytes which is the
> standard alignment of an IP header and must be supported by the
> architecture.
I'm still wondering what we are really trying to fix here.
All other tests are explicitely testing that it works with any alignment.
Shouldn't ip_fast_csum() and csum_ipv6_magic() work for any alignment as
well ? I would expect it, I see no comment in arm code which explicits
that assumption around those functions.
Isn't the problem only the following line, because csum_offset is
unaligned ?
csum = *(__wsum *)(random_buf + i + csum_offset);
Otherwise, if there really is an alignment issue for the IPv6 source or
destination address, isn't it enough to perform a 32 bits alignment ?
I guess we should involve ARM people in this discussion.
Christophe
Powered by blists - more mailing lists