From: Simon Kagstrom Date: Tue, 18 Aug 2009 12:48:56 +0200 Subject: [U-Boot] [PATCH] arm:kirkwood See to it that sent data is 8-byte aligned In-Reply-To: <73173D32E9439E4ABB5151606C3E19E202E370CC2C@SC-VEXCH1.marvell.com> References: <20090818113206.0c88b730@marrow.netinsight.se> <73173D32E9439E4ABB5151606C3E19E202E370CC2C@SC-VEXCH1.marvell.com> Message-ID: <20090818124856.55701098@marrow.netinsight.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Thanks for the review Prafulla! On Tue, 18 Aug 2009 03:12:07 -0700 Prafulla Wadaskar wrote: > > v2: Malloc send buffer (comment from Stefan Roese) > Malloc will always be an overhead. It's only allocated once (the first time a non-aligned buffer is passed), so the overhead is minimal. > I strongly recommend- we should pass aligned buffers from upper layers > to avoid such rework in all low level drivers, (few are already > aligned). We could put the same fix in eth_send instead. Then the issue is really just how we know what alignment requirement to go for. I guess one could add a field to the eth_device structure to store this and then fixup all drivers to supply this. If the rest of you thinks this is a good idea, I can cook up a patch. Opinions? > > v3: No need to use jumbo frames, use 1518 bytes buffer instead > Better to use PKTSIZE_ALIGN here, avoid magic numbers OK, I'll fix that. Thanks, // Simon