Search Linux Wireless

Re: Warning emited by 2.6.24-rc6-git5

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

 



Hi,

Happy New Year! I was out since Saturday just before you sent your
message, sorry for the late reply.

> 	header_size = ieee80211_get_hdrlen_from_skb(entry->skb);
> 	if (header_size % 4 == 2) {
> 		/*
> 		 * Move entire frame 2 bytes to the front.
> 		 */
> 		skb_push(entry->skb, 2);
> 		memmove(entry->skb->data, entry->skb->data + 2,
> 			entry->skb->len - 2);
> 	}

That doesn't really look right, I'd think the skb will be two bytes too
long after this. It's probably more efficient to decide where to copy
the frame and do the realignment while you're copying it anyway rather
than doing a copy and then a memmove.

I guess you should also try talk to Ralink to get firmware to do it
(where possible), it's probably not too hard to insert padding before
the frame.

If you absolutely can't get the hardware to do it and would otherwise do
DMA right into the skb we should try to evaluate the performance hit on
platforms where unaligned access *is* possible to be able to balance it
against the performance hit caused by the memmove(). Ultimately, though,
I value correctness on all platforms over performance on some, hence the
warning when unaligned packets are handed up to mac80211.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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