Search Linux Wireless

Re: Linux 2.6.24-rc7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 25 Jan 2008, John W. Linville wrote:
> 
> Quoth Herbert Xu:
> 
> "OK.  Let me clarify this a bit more.  We require at least one
> of the following rules to be met:
> 
> * the IPv4/IPv6 header is aligned by 8 bytes on reception;
> * or the platform provides unaligned exception handlers.

Ok, so the wireless stack currently does neither. It warns about 
lack of 4-byte alignment (not 8), and it does so for everything.

> That puts mac80211 in an awkward position.  It is not architecture
> code, so it can't make any assumptions about what is or isn't OK.
> So, we need to present aligned data to the network stack.

We can *easily* just have a "CONFIG_EXPENSIVE_UNALIGNED" thing, and force 
architectures to set that, and then just have the mac80211 code re-align 
the packet as required if it is set.

Or you guys could ask the network people to do that at an even higher 
level.

> We could put the alignment onus on mac80211, but this has proven to be
> very solvable at (near?) zero cost by all the other drivers.

>From personal experience, I would not be in the least surprised if there 
are DMA engines that simply cannot even do non-aligned DMA's.

And from a performance standpoint, it's also very possible that unaligned 
DMA accesses (if they end up being done as such by a stupid DMA engine) 
are more expensive than unaligned CPU data.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux