A simple low-level packet-based messaging API, for networks with implicit connection. More...
Files | |
| file | psp.c |
| PadicoTM PSP module. | |
| file | PSP.h |
| Padico Simple Packets API. | |
Data Structures | |
| struct | padico_psp_driver_s |
| driver descriptor for the PSP interface. More... | |
| struct | puk_receptacle_PadicoSimplePackets_s |
| struct | padico_psp_slot_s |
| a PSP slot, i.e. More... | |
| struct | padico_psp_slot_hash_entry_s |
| stores an entry in the hashtable More... | |
| struct | padico_psp_slot_hash_entry_block_lfstack_cell_s |
| struct | padico_psp_slot_hash_entry_block_lfstack_s |
| struct | padico_psp_slot_hash_entry_slice_lfstack_cell_s |
| struct | padico_psp_slot_hash_entry_slice_lfstack_s |
| struct | padico_psp_slot_hash_entry_allocator_s |
| struct | padico_psp_slot_hashtable_s |
| struct | padico_psp_slot_hashtable_enumerator_s |
| struct | padico_psp_directory_s |
| PSP slot directory used for multiplexing. More... | |
Macros | |
| #define | PADICO_PSP_TAG_NONE ((uint32_t)0x00000000) |
| uninitialized tag | |
| #define | PADICO_PSP_CONTROL ((uint32_t)0x01000000) |
| Control/PSP. | |
| #define | PADICO_PSP_CIRCUIT ((uint32_t)0x02000000) |
| Circuit/PSP. | |
| #define | PADICO_PSP_VOPW ((uint32_t)0x03000000) |
| VLink_Packet. | |
| #define | PADICO_PSP_NEWMADICO ((uint32_t)0x04000000) |
| Newmadico. | |
| #define | PADICO_PSP_MINIDRIVER ((uint32_t)0x05000000) |
| Minidriver_PSP. | |
| #define | PADICO_PSP_RESERVED ((uint32_t)0xF0000000) |
| #define | PADICO_PSP_CLOSE_CHANNEL ((uint32_t)0xF1000000) |
| [ reserved for internal use ] | |
| #define | PADICO_PSP_SYSTEM ((uint32_t)0xF2000000) |
| [ reserved for internal use ] | |
| #define | PADICO_PSP_ADAPTER_MASK ((uint32_t)0xFF000000) |
| #define | PADICO_PSP_INSTANCE_MASK ((uint32_t)0x00FFFFFF) |
Detailed Description
A simple low-level packet-based messaging API, for networks with implicit connection.
Macro Definition Documentation
◆ PADICO_PSP_ADAPTER_MASK
◆ PADICO_PSP_CIRCUIT
◆ PADICO_PSP_CLOSE_CHANNEL
◆ PADICO_PSP_CONTROL
◆ PADICO_PSP_INSTANCE_MASK
◆ PADICO_PSP_MINIDRIVER
◆ PADICO_PSP_NEWMADICO
◆ PADICO_PSP_RESERVED
◆ PADICO_PSP_SYSTEM
◆ PADICO_PSP_TAG_NONE
◆ PADICO_PSP_VOPW
Typedef Documentation
◆ padico_psp_connection_t
◆ padico_psp_handler_t
◆ padico_psp_pump_t
◆ padico_psp_slot_hash_destructor_t
◆ padico_psp_slot_hash_entry_allocator_t
◆ padico_psp_slot_hash_entry_block_lfstack_t
◆ padico_psp_slot_hash_entry_slice_lfstack_t
◆ padico_psp_slot_hash_eqfunc_t
◆ padico_psp_slot_hash_hfunc_t
◆ padico_psp_slot_hashtable_enumerator_t
◆ padico_psp_slot_hashtable_t
◆ padico_psp_slot_t
Function Documentation
◆ __attribute__() [1/4]
| struct padico_psp_slot_hash_entry_block_lfstack_cell_s __attribute__ | ( | (aligned(16)) | ) |
◆ __attribute__() [2/4]
| __attribute__ | ( | (unused) | ) |
explicit thread level
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
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
default compile-time thread level
◆ __attribute__() [3/4]
insert an entry into a hashtable
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
◆ __attribute__() [4/4]
◆ assert() [1/5]
◆ assert() [2/5]
◆ assert() [3/5]
◆ assert() [4/5]
◆ assert() [5/5]
| assert | ( | slab_size | , |
| 0 | |||
| ) |
Referenced by padico_psp_tag_build().
◆ cell()
◆ if() [1/12]
| if | ( | ! | single | ) | & -> _lock) |
◆ if() [2/12]
◆ if() [3/12]
◆ if() [4/12]
◆ if() [5/12]
| if | ( | data | ) | = ( padico_psp_slot_t )0 |
◆ if() [6/12]
◆ if() [7/12]
◆ if() [8/12]
◆ if() [9/12]
◆ if() [10/12]
◆ if() [11/12]
◆ if() [12/12]
◆ padico_free_func()
| padico_free_func | ( | slice | , |
| puk_mod_binary_get_profile() | , | ||
| padico_module_self_name() | , | ||
| __func__ | , | ||
| __FILE__ | , | ||
| __LINE__ | |||
| ) |
◆ padico_psp_connect()
|
inlinestatic |
Definition at line 176 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, padico_psp_driver_s::connect, puk_receptacle_PadicoSimplePackets_s::driver, node, NULL, and psp.
Referenced by vsock_vopw_connect().
◆ padico_psp_directory_init()
| void padico_psp_directory_init | ( | struct padico_psp_directory_s * | d | ) |
Definition at line 56 of file psp.c.
Referenced by padico_ibv_init(), psp_control_module_init(), psp_mx_module_init(), psp_shm_module_init(), and psp_socketfactory_module_init().
◆ padico_psp_end_message()
|
inlinestatic |
Definition at line 194 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, done, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::end_message, and psp.
Referenced by vlink_packet_send().
◆ padico_psp_init()
|
inlinestatic |
Definition at line 164 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::init, key, psp, and tag.
Referenced by vsock_vopw_create().
◆ padico_psp_listen()
|
inlinestatic |
Definition at line 170 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::listen, node, NULL, and psp.
Referenced by vsock_vopw_connect(), and vsock_vopw_listen().
◆ padico_psp_new_message()
|
inlinestatic |
Definition at line 182 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::new_message, node, psp, and sbuf.
Referenced by vlink_packet_new_message().
◆ padico_psp_pack()
|
inlinestatic |
Definition at line 188 of file PSP.h.
References puk_receptacle_PadicoSimplePackets_s::_status, done, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::pack, psp, and size.
Referenced by vlink_packet_send().
◆ padico_psp_slot_hash_entry_allocator_init_thread()
◆ padico_psp_slot_hash_entry_insert()
|
inlinestatic |
◆ padico_psp_slot_hash_entry_lookup()
|
inlinestatic |
◆ padico_psp_slot_hash_entry_oldprobe()
|
inlinestatic |
◆ padico_psp_slot_hash_entry_rehash_flush() [1/2]
| padico_psp_slot_hash_entry_rehash_flush | ( | h | ) |
◆ padico_psp_slot_hash_entry_rehash_flush() [2/2]
|
inlinestatic |
◆ padico_psp_slot_hash_entry_rehash_n()
|
inlinestatic |
◆ padico_psp_slot_hash_entry_rehash_row()
|
inlinestatic |
◆ padico_psp_slot_hashtable_remove()
| padico_psp_slot_hashtable_remove | ( | h | , |
| * | key | ||
| ) |
Referenced by padico_psp_slot_remove().
◆ padico_psp_slot_insert()
| padico_psp_slot_t padico_psp_slot_insert | ( | struct padico_psp_directory_s * | d, |
| padico_psp_handler_t | handler, | ||
| void * | key, | ||
| uint32_t | tag, | ||
| size_t | h_size | ||
| ) |
Definition at line 63 of file psp.c.
References assert(), done, padico_psp_slot_s::h_size, padico_psp_slot_s::handler, key, padico_psp_slot_s::key, padico_psp_slot_s::ref_count, tag, and padico_psp_slot_s::tag.
Referenced by psp_control_init(), psp_ibv_init(), psp_mx_init(), psp_sf_init(), and psp_shm_init().
◆ padico_psp_slot_lookup()
| padico_psp_slot_t padico_psp_slot_lookup | ( | struct padico_psp_directory_s * | d, |
| uint32_t | tag | ||
| ) |
Definition at line 93 of file psp.c.
References done, NULL, and tag.
Referenced by control_packet_handler(), psp_ibv_worker(), psp_mx_worker(), psp_shm_destroy(), and psp_shm_poll_handler().
◆ padico_psp_slot_remove()
| void padico_psp_slot_remove | ( | struct padico_psp_directory_s * | d, |
| padico_psp_slot_t | slot | ||
| ) |
Definition at line 84 of file psp.c.
References done, padico_psp_slot_hashtable_remove(), padico_psp_slot_s::ref_count, and padico_psp_slot_s::tag.
Referenced by psp_control_destroy(), psp_ibv_destroy(), psp_sf_destroy(), and psp_shm_destroy().
◆ padico_psp_tag_build()
build a PSP tag from an component tag and an instance tag
Definition at line 76 of file PSP.h.
References assert(), done, PADICO_PSP_ADAPTER_MASK, and PADICO_PSP_INSTANCE_MASK.
◆ padico_psp_tag_eq()
◆ padico_psp_tag_get_component()
get the 'component' (static) part from a PSP tag
Definition at line 84 of file PSP.h.
References PADICO_PSP_ADAPTER_MASK, and tag.
◆ padico_psp_tag_get_instance()
get the 'instance' (dynamic) part from a PSP tag
Definition at line 90 of file PSP.h.
References PADICO_PSP_INSTANCE_MASK, and tag.
◆ padico_psp_tag_hash()
◆ puk_component_get_driver_PadicoSimplePackets()
|
inlinestatic |
◆ puk_component_get_facet_PadicoSimplePackets()
|
inlinestatic |
◆ puk_component_indirect_PadicoSimplePackets()
|
inlinestatic |
◆ puk_context_indirect_PadicoSimplePackets()
|
inlinestatic |
◆ puk_iface_PadicoSimplePackets()
|
inlinestatic |
Attach the iface name to its driver.
Definition at line 160 of file PSP.h.
Referenced by bench_psp_init().
◆ puk_instance_context_indirect_PadicoSimplePackets()
|
inlinestatic |
Definition at line 160 of file PSP.h.
Referenced by vsock_vopw_create().
◆ puk_instance_indirect_PadicoSimplePackets()
|
inlinestatic |
Definition at line 160 of file PSP.h.
Referenced by bench_psp_init().
◆ puk_receptacle_PadicoSimplePackets_null()
|
inlinestatic |
Definition at line 160 of file PSP.h.
Referenced by vsock_vopw_fullshutdown().
◆ return()
◆ while() [1/5]
| while | ( | 0 | ) |
◆ while() [2/5]
◆ while() [3/5]
◆ while() [4/5]
| while | ( | padico_psp_slot_hash_entry_oldprobe(h, key) | ) |
◆ while() [5/5]
Variable Documentation
◆ __attribute__
| __attribute__ |
explicit thread level
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
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
default compile-time thread level
◆ _cell
| return _cell { padico_psp_slot_hash_entry_block_lfstack_push_ext(_stack, _cell, 0) |
◆ _head
◆ _next
◆ a
Definition at line 229 of file PSP.h.
Referenced by padico_psp_tag_eq(), and padico_psp_tag_hash().
◆ allocated_blocks
◆ b
| struct padico_psp_slot_hash_entry_s* b { struct padico_psp_slot_hash_entry_block_lfstack_cell_s*cell = (( struct padico_psp_slot_hash_entry_block_lfstack_cell_s *)((char*)(__typeof__ (&(( struct padico_psp_slot_hash_entry_block_lfstack_cell_s *)0)-> block ))( b )- ((size_t) &(( struct padico_psp_slot_hash_entry_block_lfstack_cell_s *)0)-> block ))) |
Definition at line 229 of file PSP.h.
Referenced by padico_psp_tag_eq().
◆ block
◆ check
◆ current
◆ data
| uint32_t padico_psp_slot_t * data { padico_psp_slot_hash_entry_rehash_n(h, 16 ) |
◆ do
| do { block = padico_psp_slot_hash_entry_block_lfstack_pop_ext(&a->blocks, a->single) |
◆ e
◆ else
◆ h
◆ i
◆ key
| uint32_t * key { if(h->oldtable) { const uint32_t z = (*( &padico_psp_tag_hash ))(key); const ssize_t index = puk_hash_to_index(z, h->oldsize); struct padico_psp_slot_hash_entry_s*e = h->oldtable + index; while(e && (e->key != (( uint32_t )0) )) { if((*( &padico_psp_tag_eq ))(key, e->key)) { padico_psp_slot_hash_entry_rehash_row(h, index); padico_psp_slot_hash_entry_rehash_n(h, 16 ); return 1; } e = e->next; } } return 0 |
Definition at line 229 of file PSP.h.
Referenced by padico_psp_init().