diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-08-01 12:29:48 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-02 15:31:31 -0700 |
commit | d4ad4d22e7ac6b8711b35d7e86eb29f03f8ac153 (patch) | |
tree | 929ebb9bc76b52037572bfb58475112989b51ba0 /include/net/inet_frag.h | |
parent | 2e404f632f44979ddf0ce0808a438249a72d7015 (diff) | |
download | blackbird-obmc-linux-d4ad4d22e7ac6b8711b35d7e86eb29f03f8ac153.tar.gz blackbird-obmc-linux-d4ad4d22e7ac6b8711b35d7e86eb29f03f8ac153.zip |
inet: frags: use kmem_cache for inet_frag_queue
Use kmem_cache to allocate/free inet_frag_queue objects since they're
all the same size per inet_frags user and are alloced/freed in high volumes
thus making it a perfect case for kmem_cache.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r-- | include/net/inet_frag.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 90015c47b447..65a8855e99fe 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -101,9 +101,11 @@ struct inet_frags { void (*destructor)(struct inet_frag_queue *); void (*skb_free)(struct sk_buff *); void (*frag_expire)(unsigned long data); + struct kmem_cache *frags_cachep; + const char *frags_cache_name; }; -void inet_frags_init(struct inet_frags *); +int inet_frags_init(struct inet_frags *); void inet_frags_fini(struct inet_frags *); void inet_frags_init_net(struct netns_frags *nf); |