From: Ben Hutchings <ben.hutchings@codethink•co.uk>
To: Ben Dooks <ben.dooks@codethink•co.uk>, netdev@vger•kernel.org
Cc: linux-kernel@lists•codethink.co.uk, linux-usb@vger•kernel.org,
oneukum@suse•com, linux-kernel@vger•kernel.org,
davem@davemloft•net
Subject: Re: [PATCH 2/4] usbnet: smsc95xx: align tx-buffer to word
Date: Thu, 04 Oct 2018 17:53:16 +0100 [thread overview]
Message-ID: <1538671996.3024.269.camel@codethink.co.uk> (raw)
In-Reply-To: <20181002092645.1115-3-ben.dooks@codethink.co.uk>
On Tue, 2018-10-02 at 10:26 +0100, Ben Dooks wrote:
> The tegra driver requires alignment of the buffer, so try and
> make this better by pushing the buffer start back to an word
> aligned address. At the worst this makes memcpy() easier as
> it is word aligned, at best it makes sure the usb can directly
> map the buffer.
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink•co.uk>
> [todo - make this configurable]
[...]
I don't think you need a separate kconfig symbol for this. Aligning RX
buffers to words (or better, cache lines) is almost always a win, so
long as the CPU can handle misaligned fields in the network/transport
headers. You can use #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to
check that.
It seems like NET_IP_ALIGN should be defined to 0 or 2 depending on
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, but NET_IP_ALIGN predates the
latter.
Ben.
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
next prev parent reply other threads:[~2018-10-04 16:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 9:26 SMSC95XX driver updates Ben Dooks
2018-10-02 9:26 ` [PATCH 1/4] usbnet: smsc95xx: add kconfig for turbo mode Ben Dooks
2018-10-02 12:46 ` Andrew Lunn
2018-10-02 9:26 ` [PATCH 2/4] usbnet: smsc95xx: align tx-buffer to word Ben Dooks
2018-10-02 13:19 ` David Laight
2018-10-02 13:35 ` Ben Dooks
2018-10-02 16:56 ` [PATCH] usbnet: smsc95xx: simplify tx_fixup code Ben Dooks
2018-10-03 13:36 ` David Laight
2018-10-03 16:25 ` Ben Dooks
2018-10-05 21:24 ` David Miller
2018-10-06 11:27 ` Ben Dooks
2018-10-06 17:28 ` David Miller
2018-10-08 8:41 ` David Laight
2018-10-04 16:53 ` Ben Hutchings [this message]
2018-10-02 9:26 ` [PATCH 3/4] usbnet: smsc95xx: check for csum being in last four bytes Ben Dooks
2018-10-02 9:45 ` Sergei Shtylyov
2018-10-04 16:55 ` Ben Hutchings
2018-10-02 9:26 ` [PATCH 4/4] usbnet: smsc95xx: fix rx packet alignment Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538671996.3024.269.camel@codethink.co.uk \
--to=ben.hutchings@codethink$(echo .)co.uk \
--cc=ben.dooks@codethink$(echo .)co.uk \
--cc=davem@davemloft$(echo .)net \
--cc=linux-kernel@lists$(echo .)codethink.co.uk \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oneukum@suse$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox