handing cloned frames to netif_rx()?

2008-01-11 Thread Johannes Berg
In 802.11n, there is a case where multiple data frames are received aggregated into a single frame (A-MSDU). Currently, we copy each of these frames out into their own skb, but because of the alignment with that etc. I started to think that we could simply pass up a clone of the original skb with

Re: handing cloned frames to netif_rx()?

2008-01-11 Thread Tomas Winkler
On Jan 11, 2008 3:17 AM, Johannes Berg [EMAIL PROTECTED] wrote: In 802.11n, there is a case where multiple data frames are received aggregated into a single frame (A-MSDU). Currently, we copy each of these frames out into their own skb, but because of the alignment with that etc. I started to

Re: handing cloned frames to netif_rx()?

2008-01-11 Thread Herbert Xu
Johannes Berg [EMAIL PROTECTED] wrote: Is it ok to do this? Will something freak out if we pass a cloned skb to netif_rx()? Sounds OK as long as you stick to the rules of cloned skb's, e.g., not writing to them unless you've copied it. Cheers, -- Visit Openswan at http://www.openswan.org/

Re: handing cloned frames to netif_rx()?

2008-01-11 Thread Johannes Berg
On Sat, 2008-01-12 at 09:31 +1100, Herbert Xu wrote: Johannes Berg [EMAIL PROTECTED] wrote: Is it ok to do this? Will something freak out if we pass a cloned skb to netif_rx()? Sounds OK as long as you stick to the rules of cloned skb's, e.g., not writing to them unless you've copied

Re: handing cloned frames to netif_rx()?

2008-01-11 Thread Herbert Xu
On Fri, Jan 11, 2008 at 11:58:05PM +0100, Johannes Berg wrote: Ok. Yes, we will of course adhere to that, but I was wondering whether maybe the net stack assumes somewhere that a packet it got from the driver can be written to w/o copying. All parts of the rx stack support clone handling

Re: handing cloned frames to netif_rx()?

2008-01-11 Thread Johannes Berg
On Sat, 2008-01-12 at 10:01 +1100, Herbert Xu wrote: On Fri, Jan 11, 2008 at 11:58:05PM +0100, Johannes Berg wrote: Ok. Yes, we will of course adhere to that, but I was wondering whether maybe the net stack assumes somewhere that a packet it got from the driver can be written to w/o