2013/8/11 Rafał Miłecki <[email protected]>: > 2013/8/11 Robert Bradley <[email protected]>: >> >> On 11 Aug 2013 18:13, "Rafał Miłecki" <[email protected]> wrote: >>> >>> 2013/8/11 Robert Bradley <[email protected]>: >>> > it might be worth testing a build with these applied and use Florian's >>> > method instead (pass the current SKB to the stack as-is and create a new >>> > one >>> > for the next DMA read). >>> >>> I already this trick, but it didn't help :( See my first e-mail from >>> today. >> >> Forgive me for asking, but aren't those results measured without the >> additional patches from ar71xx applied to the kernel source? > > Ah, I'm sorry. I didn't realize that my patches removed memcpy and > reintroduced unaligned access problem... That problem is pretty > complex, and that ar71xx don't really make that much easier.
First of all, I played with /sys/kernel/debug/mips/ a little. I've confirmed that replacing netdev_alloc_skb_ip_align with netdev_alloc_skb produces unaligned warnings for me. I wanted to be sure that debugging is working fine for me. So then I've applied my patches: 0001-bgmac-separate-RX-desc-setup-code-into-new-function.patch 0002-bgmac-pass-received-packet-to-the-netif-instead-of-c.patch and... I don't get any unaligned access warnings! That surprised me, because I was afraid I re-introduces them with my patches. After analyzing it for a bit longer I noticed following thing: 1) skb starts at aligned address 2) first 28B in skb are reserved for Broadcom's header 3) then there are unused 2B 4) then finally ethernet packets starts So: 1) Ethernet packets starts at 28B+2B = 30B offset 2) Ethernet packet is 14B long 3) IP packet starts at 30B+14B = 44B offset I don't get any warnings, so I assume 4B alignment is alright for MIPS. Is that right? So with my recent patches there isn't any unaligned access, but the performance still sucks :| It means our bottleneck is caused by sth different. My next plans: 1) Try Nathan's suggestions, see [RFC][PATCH 2/2] bgmac: pass received packet to the netif instead of copying it 2) Try "profile" tool from Linux kernel. Unfortunately I can't find OpenWrt package for it, so I may need to write my own :| Hope one of the above will result in discovering the problem... If anyone has any extra ideas, I'd love to hear them. -- Rafał _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
