Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\rhashtable.c Create Date:2022-07-28 06:25:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:nested_bucket_table_alloc

Proto:static struct bucket_table *nested_bucket_table_alloc(struct rhashtable *ht, size_t nbuckets, gfp_t gfp)

Type:struct bucket_table

Parameter:

TypeParameterName
struct rhashtable *ht
size_tnbuckets
gfp_tgfp
142  shift = PAGE_SHIFT determines the page size - log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the ( size of * )
146  If nbuckets < 1 << shift + 1 Then Return NULL
149  size = size of tbl + size of buckets[0]
151  tbl = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
152  If Not tbl Then Return NULL
155  If Not nested_table_alloc(ht, (unionnested_table__rcu * * )buckets, false) Then
157  kfree(tbl)
158  Return NULL
161  nest = (log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (nbuckets) - 1) % shift + 1
163  Return tbl
Caller
NameDescribe
bucket_table_alloc