Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_insert_dup

Proto:static int __init test_insert_dup(struct test_obj_rhl *rhl_test_objects, int cnt, bool slow)

Type:int

Parameter:

TypeParameterName
struct test_obj_rhl *rhl_test_objects
intcnt
boolslow
539  err = 0
541  rhlt = kmalloc( size of rhlt , GFP_KERNEL)
542  If WARN_ON(!rhlt) Then Return -EINVAL
545  err = hltable_init - initialize a new hash list table*@hlt: hash list table to be initialized*@params: configuration parameters* Initializes a new hash list table.* See documentation for rhashtable_init.
546  If WARN_ON(err) Then
547  kfree(rhlt)
548  Return err
551  When i < cnt cycle
552  tid = i
553  key = rht_obj( & ht, & rhead)
554  key += key_offset
556  If slow Then
559  If err == -EAGAIN Then err = 0
561  Else err = hltable_insert - insert object into hash list table*@hlt: hash list table*@list: pointer to hash list head inside object*@params: hash table parameters* Will take the per bucket bitlock to protect against mutual mutations* on the same bucket
565  If WARN(err, "error %d on element %d/%d (%s)\n", err, i, cnt, slow ? "slow" : "fast") Then Go to skip_print
569  ret = print_ht(rhlt)
570  WARN(ret != cnt, "missing rhltable elements (%d != %d, %s)\n", ret, cnt, slow ? "slow" : "fast")
572  skip_print :
573  rhltable_destroy(rhlt)
574  kfree(rhlt)
576  Return 0
Caller
NameDescribe
test_insert_duplicates_run