summaryrefslogtreecommitdiff
path: root/src/lib/shm_du_map.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: include stdlib.h, not malloc.hdimitri staessens2016-04-021-1/+1
|
* lib/ipcpd: fixed logging mistakedimitri staessens2016-03-251-0/+5
| | | | logs should be included in source, not in header
* lib: Shared Memorydimitri staessens2016-03-241-134/+68
| | | | | | | | Updated tests. Added code to drop a corner case (packet where the tail PCI would cross the edge of the ring buffer) because solving this very rare case is not worth the performance hit on the ringbuffer the extra code would incur. This means the ringbuffer might drop a very small percentage of packets.
* lib: optimization of ringbufferDimitri Staessens2016-03-201-15/+14
| | | | | | | | Got rid of divisions and modulo operations. Change in the meaning of a #define. SHM_DU_MAP_SIZE: is now an exponent of 2. Default is 10, allowing for 1024 blocks in the map.
* lib: updated shm_du_map to be a hybrid ring bufferDimitri Staessens2016-03-191-127/+67
| | | | | | Elements must be created/destroyed in order, but IPCPs can access PCI while the PDU is in the ring buffer. Test updated, no more waits are needed.
* lib: shared memory mapDimitri Staessens2016-03-191-0/+493
The shared memory map will allow passing SDU's between IPCPs efficiently. It is a single block of managed memory. SDU's are stored in a shm_du_buff datastructure, which is a list of blocks inside the shared memory region. The mechanism for passing SDU's is not yet implemented and could be either within the region or using another local IPC mechanism. The following things are configured at compile time: SHM_FILE_NAME : the name. Default is "ouroboros_du_map". SHM_DU_BUFF_BLOCK_SIZE: size of a block inside the shared memory region. Default is the pagesize of the system. SHM_DU_MAP_SIZE : the approximate size in bytes of the shared memory map. The actual filesize may differ by a small margin. Default is 4MB.