Search Linux Wireless

Re: Warning emited by 2.6.24-rc6-git5

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

 



On Saturday 29 December 2007, Johannes Berg wrote:
> 
> > If it helps as reference, rt2x00 allocates and initializes the data as follows:
> > 
> > 		skb_reserve(skb, NET_IP_ALIGN);
> > 		skb_put(skb, desc.size); /* Always a multiple of 4 bytes */
> > 		memcpy(skb->data, entry->data_addr, desc.size);
> 
> So why do you copy all the data anyway? You have DMA queues and no need
> to not have the hardware dump the data into the frame to start with, no?

True, if no further aligning would be required that would be true,
but since the payload should be aligned to a 4 byte boundrary anyway
this would mean we must use memcpy() in all cases anyway since we
can't predict what header length the frame will contain. :(

Although it would safe the initial allocation of the DMA buffer...
I'll look into it to see if it would be useful.

> In any case, with wireless NET_IP_ALIGN is pretty useless unless you
> want to add two to it and then align the result. Maybe the mac80211
> warning should be relaxed to take NET_IP_ALIGN into account.

Ok, I'll look into better aligning of the skb buffer then.

Ivo
-
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