On Mon, Apr 30, 2012 at 7:49 AM, David Woodhouse <dw...@infradead.org> wrote: > On Mon, 2012-04-30 at 07:41 -0700, Dave Taht wrote: >> Tell it to however wired up this chip and shipped it in qty millions. >> Actually that message was already received, successor chipsets from >> this manufacturer did it up right. > > So the real problem is that the ar71xx doesn't allow you to DMA to > addresses which aren't aligned to 4 bytes? Which network devices does > that restriction apply to? All of them?
> Out of interest, have you done a performance comparison with just > *moving* the packet when it arrives? I did not. Felix did. Fixing this issue has had a long, tortuous history... this got tried and later backed out... https://dev.openwrt.org/changeset/20892 "- on ar724x, rx buffers can be aligned with an offset of 2, which keeps the ip header aligned - alignment offset is only added if the ar8216 workaround is not active and the phy driver does not advertise its own packet alignment - ar71xx and ar91xx can not handle rx alignment offsets, however taking a hit on unaligned exceptions seems to have less overhead than re-aligning the data for large packets - use memmove to re-align small packets, if necessary tested on ar9132, ar7240 and ar7242 based devices without ar8216 headers" Which got backed out here: https://dev.openwrt.org/ticket/7236 So I'd certainly be willing to attempt realignment in the driver, and sort of remember that it's like a one-liner to do nowadays... but it is a 16 bit bus, and packets are dmaed, so getting the cpu involved on every ethernet transfer strikes me as potentially very bad. > > If this really is needed to work around hardware limitations, I don't > see why *some* of it shouldn't be acceptable upstream. A config option > to add '__packed' to various structures is fairly harmless, for > example... The __packed trick, so far as I know, is undefined gcc behavior. But, yea, perhaps something more PC than this.... #define F_ING_HW_ENGINEER_SAVED_A_PIN __packed > > -- > dwmw2 -- Dave Täht SKYPE: davetaht US Tel: 1-239-829-5608 http://www.bufferbloat.net _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel