From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS Date: Fri, 5 Oct 2018 14:16:02 +0100 Message-ID: <20181005131601.GE14398@arm.com> References: <20181004173631.3nchegr6rm3jgz24@xylophone.i.decadent.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ben Hutchings , Russell King , Catalin Marinas , "" , linux-kernel@lists.codethink.co.uk, linux-s390 , Ben Dooks , linux-arm-kernel To: Ard Biesheuvel Return-path: Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51290 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727701AbeJEUOS (ORCPT ); Fri, 5 Oct 2018 16:14:18 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Oct 04, 2018 at 07:43:59PM +0200, Ard Biesheuvel wrote: > (+ Arnd, Russell, Catalin, Will) > > On 4 October 2018 at 19:36, Ben Hutchings wrote: > > NET_IP_ALIGN is supposed to be defined as 0 if DMA writes to an > > unaligned buffer would be more expensive than CPU access to unaligned > > header fields, and otherwise defined as 2. > > > > Currently only ppc64 and x86 configurations define it to be 0. > > However several other architectures (conditionally) define > > CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, which seems to imply that > > NET_IP_ALIGN should be 0. > > > > Remove the overriding definitions for ppc64 and x86 and define > > NET_IP_ALIGN solely based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. > > > > Signed-off-by: Ben Hutchings > > While this makes sense for arm64, I don't think it is appropriate for > ARM per se. Agreed that this makes sense for arm64, and I'd be happy to take a patch defining it as 0 there. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 5 Oct 2018 14:16:02 +0100 Subject: [RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS In-Reply-To: References: <20181004173631.3nchegr6rm3jgz24@xylophone.i.decadent.org.uk> Message-ID: <20181005131601.GE14398@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Oct 04, 2018 at 07:43:59PM +0200, Ard Biesheuvel wrote: > (+ Arnd, Russell, Catalin, Will) > > On 4 October 2018 at 19:36, Ben Hutchings wrote: > > NET_IP_ALIGN is supposed to be defined as 0 if DMA writes to an > > unaligned buffer would be more expensive than CPU access to unaligned > > header fields, and otherwise defined as 2. > > > > Currently only ppc64 and x86 configurations define it to be 0. > > However several other architectures (conditionally) define > > CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, which seems to imply that > > NET_IP_ALIGN should be 0. > > > > Remove the overriding definitions for ppc64 and x86 and define > > NET_IP_ALIGN solely based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. > > > > Signed-off-by: Ben Hutchings > > While this makes sense for arm64, I don't think it is appropriate for > ARM per se. Agreed that this makes sense for arm64, and I'd be happy to take a patch defining it as 0 there. Will