Release 4.11 net/xfrm/xfrm_hash.c
/* xfrm_hash.c: Common hash table code.
*
* Copyright (C) 2006 David S. Miller (davem@davemloft.net)
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/xfrm.h>
#include "xfrm_hash.h"
struct hlist_head *xfrm_hash_alloc(unsigned int sz)
{
struct hlist_head *n;
if (sz <= PAGE_SIZE)
n = kzalloc(sz, GFP_KERNEL);
else if (hashdist)
n = vzalloc(sz);
else
n = (struct hlist_head *)
__get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO,
get_order(sz));
return n;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David S. Miller | 62 | 91.18% | 1 | 25.00% |
Joonwoo Park | 3 | 4.41% | 1 | 25.00% |
Herbert Xu | 2 | 2.94% | 1 | 25.00% |
Eric Dumazet | 1 | 1.47% | 1 | 25.00% |
Total | 68 | 100.00% | 4 | 100.00% |
void xfrm_hash_free(struct hlist_head *n, unsigned int sz)
{
if (sz <= PAGE_SIZE)
kfree(n);
else if (hashdist)
vfree(n);
else
free_pages((unsigned long)n, get_order(sz));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David S. Miller | 50 | 100.00% | 1 | 100.00% |
Total | 50 | 100.00% | 1 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
David S. Miller | 134 | 95.71% | 1 | 25.00% |
Joonwoo Park | 3 | 2.14% | 1 | 25.00% |
Herbert Xu | 2 | 1.43% | 1 | 25.00% |
Eric Dumazet | 1 | 0.71% | 1 | 25.00% |
Total | 140 | 100.00% | 4 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.