Address DB for easy connection establishment. More...
#include <Padico/Puk.h>#include <Padico/Module.h>#include <Padico/PadicoControl.h>#include <Padico/Topology.h>#include "AddrDB.h"
Go to the source code of this file.
Data Structures | |
| struct | padico_address_key_s |
| struct | padico_address_entry_s |
| struct | padico_addrkey_hash_entry_s |
| stores an entry in the hashtable More... | |
| struct | padico_addrkey_hash_entry_block_lfstack_cell_s |
| struct | padico_addrkey_hash_entry_block_lfstack_s |
| struct | padico_addrkey_hash_entry_slice_lfstack_cell_s |
| struct | padico_addrkey_hash_entry_slice_lfstack_s |
| struct | padico_addrkey_hash_entry_allocator_s |
| struct | padico_addrkey_hashtable_s |
| struct | padico_addrkey_hashtable_enumerator_s |
Variables | ||
| struct puk_mod_binary_s | padico_mod_binary__AddrDB = { .name = "AddrDB", .funcs = &padico_mod_funcs__AddrDB , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_AddrDB , .n_deps = sizeof((char*[]){ 0, "Topology", "PadicoControl" }) / sizeof(char*), .deps = { NULL, "Topology", "PadicoControl" } } | |
| static const struct puk_mod_funcs_s | padico_mod_funcs__AddrDB = { .init = ( padico_addrdb_init ), .run = ( NULL ), .finalize = ( padico_addrdb_finalize ) } | |
| struct padico_addrkey_hash_entry_block_lfstack_cell_s * | _next = _stack->_head | |
| struct padico_addrkey_hash_entry_block_lfstack_s | __attribute__ | |
| hint whether the queue is empty. | ||
| struct padico_addrkey_hash_entry_block_lfstack_cell_s | block [] = NULL | |
| struct { | ||
| struct padico_addrkey_hashtable_s table | ||
| pthread_mutex_t lock | ||
| pthread_cond_t event | ||
| } | addr_db | |
Detailed Description
Address DB for easy connection establishment.
Definition in file addrdb.c.
Typedef Documentation
◆ padico_addrkey_hash_destructor_t
| typedef void(* padico_addrkey_hash_destructor_t) (struct padico_address_key_s *key, struct padico_address_entry_s *data) |
◆ padico_addrkey_hash_entry_allocator_t
◆ padico_addrkey_hash_entry_block_lfstack_t
◆ padico_addrkey_hash_entry_slice_lfstack_t
◆ padico_addrkey_hash_eqfunc_t
| typedef int(* padico_addrkey_hash_eqfunc_t) (struct padico_address_key_s *key1, struct padico_address_key_s *key2) |
◆ padico_addrkey_hash_hfunc_t
| typedef uint32_t(* padico_addrkey_hash_hfunc_t) (struct padico_address_key_s *key) |
◆ padico_addrkey_hashtable_enumerator_t
◆ padico_addrkey_hashtable_t
Function Documentation
◆ __attribute__() [1/4]
| struct padico_addrkey_hash_entry_block_lfstack_cell_s __attribute__ | ( | (aligned(16)) | ) |
◆ __attribute__() [2/4]
| __attribute__ | ( | (unused) | ) |
lookup in the oldtable; if found, migrate row and return cell in regular table
get the seq part of a tagged ptr
pop key & data of any element in the table
remove entry with given key from hashtable; does nothing if key not found
allocate a new hashtable
trigger progressive rehashing
flush all rows of a pending rehash
lookup an entry in the hashtable
insert an entry in the given table, without rehashing
make progress on rehash for n rows
force rehashing of given row
◆ __attribute__() [3/4]
◆ __attribute__() [4/4]
◆ padico_addrdb_entry_destructor()
|
static |
Definition at line 116 of file addrdb.c.
References e, and padico_addrdb_free_entry().
◆ padico_addrdb_finalize()
◆ padico_addrdb_free_entry()
|
static |
Definition at line 191 of file addrdb.c.
References done, e, ns_rulebucket_hash_entry_s::key, NULL, and padico_addrkey_delete().
Referenced by padico_addrdb_dynget(), padico_addrdb_entry_destructor(), padico_addrdb_get(), and padico_addrdb_insert().
◆ padico_addrdb_init()
◆ padico_addrdb_insert()
|
static |
Definition at line 201 of file addrdb.c.
References addr_db, assert(), component, done, e, instance, padico_address_key_s::instance_size, ns_rulebucket_hash_entry_s::key, node, NULL, padico_addrdb_free_entry(), padico_addrdb_new_entry(), padico_addrkey_delete(), padico_addrkey_new(), and padico_tm_req_notify().
Referenced by padico_addrdb_publish_handler().
◆ padico_addrdb_new_entry()
|
static |
Definition at line 179 of file addrdb.c.
References done, e, ns_rulebucket_hash_entry_s::key, and NULL.
Referenced by padico_addrdb_dynget(), padico_addrdb_get(), and padico_addrdb_insert().
◆ padico_addrdb_publish_handler()
|
static |
Definition at line 128 of file addrdb.c.
References component, done, e, instance, padico_address_key_s::instance_size, NULL, padico_addrdb_insert(), and padico_topo_getnodebyname().
Referenced by padico_addrdb_init().
◆ padico_addrkey_delete()
|
static |
Definition at line 109 of file addrdb.c.
Referenced by padico_addrdb_dynget(), padico_addrdb_free_entry(), padico_addrdb_get(), and padico_addrdb_insert().
◆ padico_addrkey_eq()
|
static |
◆ padico_addrkey_hash()
|
static |
Definition at line 82 of file addrdb.c.
References a, done, padico_topo_node_getuuid(), PADICO_TOPO_UUID_SIZE, and z.
◆ padico_addrkey_hash_entry_insert()
|
inlinestatic |
◆ padico_addrkey_hash_entry_lookup()
|
inlinestatic |
◆ padico_addrkey_hash_entry_oldprobe()
|
inlinestatic |
◆ padico_addrkey_hash_entry_rehash_flush()
|
inlinestatic |
◆ padico_addrkey_hash_entry_rehash_n()
|
inlinestatic |
◆ padico_addrkey_hash_entry_rehash_row()
|
inlinestatic |
◆ padico_addrkey_new()
|
static |
Definition at line 98 of file addrdb.c.
References a, component, done, instance, padico_address_key_s::instance_size, and node.
Referenced by padico_addrdb_dynget(), padico_addrdb_get(), and padico_addrdb_insert().
◆ padico_module_create_initializer__AddrDB()
Variable Documentation
◆ __attribute__
| __attribute__ |
hint whether the queue is empty.
add a binding to a node; take ownership of binding
get the seq part of a tagged ptr
insert an entry into a hashtable
default compile-time thread level
explicit thread level
check consistency of cells in list
pop key & data of any element in the table
remove entry with given key from hashtable; does nothing if key not found
returns <key,value> associated with given key, outkey is set to NULL if key not found
probes whether an entry with given key exists in the hashtable
returns value associated with key, NULL if not found
deallocate a hashtable
destroy a hashtable
allocate a new hashtable
initialize a new hashtable
trigger progressive rehashing
flush all rows of a pending rehash
lookup an entry in the hashtable
insert an entry in the given table, without rehashing
make progress on rehash for n rows
force rehashing of given row
lookup in the oldtable; if found, migrate row and return cell in regular table
get the allocated queue size
hint about the number of elements in queue .
- Do not rely on it: state may have changed before dequeue * Usefull to reduce active polling, though
Do not rely on it: state may have changed before function return.
insert e after r
Definition at line 32 of file bench_lfqueue.c.
Referenced by padico_vio_fcntl(), sfplain_close(), sfsnc_close(), sfsnc_create(), sfsrtun_close(), sfssh2_close(), sfssh2_create(), sfstun_close(), vlink_ps_send_post(), and vlink_resolver_resolve_node().
◆ _next
Definition at line 134 of file Ns-basic-internals.h.
Referenced by main().
◆ [struct]
| struct { ... } addr_db |
Referenced by padico_addrdb_dynget(), padico_addrdb_finalize(), padico_addrdb_get(), padico_addrdb_init(), and padico_addrdb_insert().
◆ block
Definition at line 134 of file Ns-basic-internals.h.
Referenced by my_shm_recv(), my_shm_send(), padico_shm_block_alloc(), padico_shm_block_assert(), padico_shm_block_free(), padico_shm_block_from_num(), padico_shm_block_from_ptr(), padico_shm_block_from_short_ptr(), padico_shm_block_get_ptr(), padico_shm_large_recv_poll(), padico_shm_large_send(), padico_shm_seg_init(), padico_shm_short_get_ptr(), padico_shm_short_recv_poll(), padico_shm_short_send_commit(), psp_shm_new_message(), psp_shm_poll_handler(), and psp_shm_polling_worker().
◆ event
| pthread_cond_t event |
◆ lock
| pthread_mutex_t lock |
◆ padico_mod_binary__AddrDB
| struct puk_mod_binary_s padico_mod_binary__AddrDB = { .name = "AddrDB", .funcs = &padico_mod_funcs__AddrDB , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_AddrDB , .n_deps = sizeof((char*[]){ 0, "Topology", "PadicoControl" }) / sizeof(char*), .deps = { NULL, "Topology", "PadicoControl" } } |
◆ padico_mod_funcs__AddrDB
|
static |
◆ table
Definition at line 72 of file addrdb.c.
Referenced by padico_group_topology().