aboutsummaryrefslogtreecommitdiff
path: root/net/core/skb_dma_map.c
AgeCommit message (Collapse)Author
2009-06-08net: skb_shared_info optimizationEric Dumazet
skb_dma_unmap() is quite expensive for small packets, because we use two different cache lines from skb_shared_info. One to access nr_frags, one to access dma_maps[0] Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements, let dma_head alone in a new dma_head field, close to nr_frags, to reduce cache lines misses. Tested on my dev machine (bnx2 & tg3 adapters), nice speedup ! Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08net: num_dma_maps is not usedEric Dumazet
Get rid of num_dma_maps in struct skb_shared_info, as it seems unused. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-12net: Fix off-by-one in skb_dma_mapDimitris Michailidis
The unwind loop iterates down to -1 instead of stopping at 0 and ends up accessing ->frags[-1]. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11net: Add SKB DMA mapping helper functions.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>