Function report |
Source Code:kernel\bpf\hashtab.c |
Create Date:2022-07-28 13:09:52 |
Last Modify:2022-05-23 09:15:29 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_htab_elem
Proto:static struct htab_elem *alloc_htab_elem(struct bpf_htab *htab, void *key, void *value, u32 key_size, u32 hash, bool percpu, bool onallcpus, struct htab_elem *old_elem)
Type:struct htab_elem
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_htab * | htab | |
void * | key | |
void * | value | |
u32 | key_size | |
u32 | hash | |
bool | percpu | |
bool | onallcpus | |
struct htab_elem * | old_elem |
726 | size = value_size |
727 | prealloc = htab_is_prealloc(htab) |
731 | If prealloc Then |
747 | Else |
748 | If atomic_inc_return( & number of elements in this hashtable ) > max_entries Then If Not old_elem Then |
760 | If Not l_new Then |
768 | No 3D Now!(key, key, key_size) |
769 | If percpu Then |
771 | If prealloc Then |
772 | pptr = htab_elem_get_ptr(l_new, key_size) |
773 | Else |
777 | If Not pptr Then |
784 | pcpu_copy_value(htab, pptr, value, onallcpus) |
786 | If Not prealloc Then htab_elem_set_ptr(l_new, key_size, pptr) |
788 | Else if fd_htab_map_needs_adjust(htab) Then |
791 | Else |
798 | Return l_new |
799 | dec_count : |
801 | Return l_new |
Name | Describe |
---|---|
htab_map_update_elem | Called from syscall or from eBPF program |
__htab_percpu_map_update_elem |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |