summaryrefslogtreecommitdiff
path: root/net/ieee802154
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@redhat.com>2014-08-01 12:29:48 +0200
committerDavid S. Miller <davem@davemloft.net>2014-08-02 15:31:31 -0700
commitd4ad4d22e7ac6b8711b35d7e86eb29f03f8ac153 (patch)
tree929ebb9bc76b52037572bfb58475112989b51ba0 /net/ieee802154
parent2e404f632f44979ddf0ce0808a438249a72d7015 (diff)
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 'net/ieee802154')
-rw-r--r--net/ieee802154/reassembly.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c
index 5607accd2fee..ffec6ce51005 100644
--- a/net/ieee802154/reassembly.c
+++ b/net/ieee802154/reassembly.c
@@ -30,6 +30,8 @@
#include "reassembly.h"
+static const char lowpan_frags_cache_name[] = "lowpan-frags";
+
struct lowpan_frag_info {
__be16 d_tag;
u16 d_size;
@@ -571,7 +573,10 @@ int __init lowpan_net_frag_init(void)
lowpan_frags.qsize = sizeof(struct frag_queue);
lowpan_frags.match = lowpan_frag_match;
lowpan_frags.frag_expire = lowpan_frag_expire;
- inet_frags_init(&lowpan_frags);
+ lowpan_frags.frags_cache_name = lowpan_frags_cache_name;
+ ret = inet_frags_init(&lowpan_frags);
+ if (ret)
+ goto err_pernet;
return ret;
err_pernet: