Function report |
Source Code:kernel\bpf\reuseport_array.c |
Create Date:2022-07-28 13:29:46 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Called from syscall only.* The "nsk" in the fd refcnt.* The "osk" and "reuse" are protected by reuseport_lock.
Proto:int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_map * | map | |
void * | key | |
void * | value | |
u64 | map_flags |
251 | array = reuseport_array(map) |
258 | If map_flags > update existing element Then Return -EINVAL |
261 | If index >= max_entries Then Return -E2BIG |
264 | If value_size == sizeof(u64) Then |
270 | Else |
274 | socket = sockfd_lookup(fd, & err) |
279 | If Not nsk Then |
292 | spin_lock_bh( & reuseport_lock) |
298 | write_lock_bh( & sk_callback_lock) |
305 | If err Then Go to put_file_unlock |
309 | err = reuseport_get_id(reuse) |
310 | If err < 0 Then Go to put_file_unlock |
313 | WRITE_ONCE(sk_user_data, & ptrs[index]) |
316 | err = 0 |
318 | put_file_unlock : |
319 | write_unlock_bh( & sk_callback_lock) |
321 | If free_osk Then |
322 | write_lock_bh( & sk_callback_lock) |
323 | WRITE_ONCE(sk_user_data, NULL) |
324 | write_unlock_bh( & sk_callback_lock) |
327 | spin_unlock_bh( & reuseport_lock) |
328 | put_file : |
330 | Return err |
Name | Describe |
---|---|
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 |