mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
net: pskb_expand_head() optimization
Move frags[] at the end of struct skb_shared_info, and make pskb_expand_head() copy only the used part of it instead of whole array. This should avoid kmemcheck warnings and speedup pskb_expand_head() as well, avoiding a lot of cache misses. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c1f79426e2
commit
fed66381d6
2 changed files with 3 additions and 2 deletions
|
@ -202,10 +202,11 @@ struct skb_shared_info {
|
|||
*/
|
||||
atomic_t dataref;
|
||||
|
||||
skb_frag_t frags[MAX_SKB_FRAGS];
|
||||
/* Intermediate layers must ensure that destructor_arg
|
||||
* remains valid until skb destructor */
|
||||
void * destructor_arg;
|
||||
/* must be last field, see pskb_expand_head() */
|
||||
skb_frag_t frags[MAX_SKB_FRAGS];
|
||||
};
|
||||
|
||||
/* We divide dataref into two halves. The higher 16 bits hold references
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue