From mboxrd@z Thu Jan 1 00:00:00 1970 From: Siarhei Siamashka Date: Wed, 14 May 2014 11:32:20 +0300 Subject: [U-Boot] [linux-sunxi] [PATCH 3/2] net/designware: reorder struct dw_eth_dev to pack more efficiently. In-Reply-To: <20140514110159.3e600217@i7> References: <1398714651-1175-2-git-send-email-ijc@hellion.org.uk> <1398970918.19277.181.camel@hastur.hellion.org.uk> <20140514104413.2fd33f97@i7> <1400053970.27638.12.camel@dagon.hellion.org.uk> <20140514110159.3e600217@i7> Message-ID: <20140514113220.4e3452e3@i7> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 14 May 2014 11:01:59 +0300 Siarhei Siamashka wrote: > On Wed, 14 May 2014 08:52:50 +0100 > Ian Campbell wrote: > > > On Wed, 2014-05-14 at 10:44 +0300, Siarhei Siamashka wrote: > > > > diff --git a/drivers/net/designware.h b/drivers/net/designware.h > > > > index 382b0c7..6d94b3a 100644 > > > > --- a/drivers/net/designware.h > > > > +++ b/drivers/net/designware.h > > > > @@ -215,13 +215,13 @@ struct dmamacdescr { > > > > #endif > > > > > > > > struct dw_eth_dev { > > > > + struct dmamacdescr tx_mac_descrtable[CONFIG_TX_DESCR_NUM]; > > > > + struct dmamacdescr rx_mac_descrtable[CONFIG_RX_DESCR_NUM]; > > > > + > > > > u32 interface; > > > > u32 tx_currdescnum; > > > > u32 rx_currdescnum; > > > > > > > > - struct dmamacdescr tx_mac_descrtable[CONFIG_TX_DESCR_NUM]; > > > > - struct dmamacdescr rx_mac_descrtable[CONFIG_RX_DESCR_NUM]; > > > > - > > > > char txbuffs[TX_TOTAL_BUFSIZE]; > > > > char rxbuffs[RX_TOTAL_BUFSIZE]; > > > > > > After this reordering, txbuffs and rxbuffs buffers become DMA unaligned. > > > > Right, this is fixed in the repost which is part of "[PATCH v3 0/5] > > net/designware: fixes for data cache, phylib and burst size". > > Oh, you just forgot to add the linux-sunxi list to CC when sending > the updated patches. This explains why I don't see them in my mailbox. However, as I can see at http://lists.denx.de/pipermail/u-boot/2014-May/179218.html you are still sandwiching interface, tx_currdescnum and rx_currdescnum between the DMA aligned stuff. This does not really improve packing. -- Best regards, Siarhei Siamashka