| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The hashtable is only used for forwarding tables in the unicast
IPCP. This moves the generic hashtable out of the library into the
unicast IPCP to prepare a more tailored implementation specific to
routing tables containing address lists.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
|
| |
This adds some tests for the shm_rbuff after some reports that the
queue length would be erroneously reported as 0 when the rbuff was
full. The test passes for the reported case.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds rudimentary support for sending and processing
acknowledgments and doing retransmission.
It replaces the generic timerwheel with a specific one for
retransmission. This is currently a fixed wheel allowing
retransmissions to be scheduled up to about 32 seconds into the
future. It currently has an 8ms resolution. This could be made
configurable in the future. Failures of the flow (i.e. rtx not
working) are indicated by the rxmwheel_move() function returning a fd.
This is currently not yet handled (maybe just setting the state of the
flow to FLOWDOWN is a better solution).
The shm_rdrbuff tracks the number of users of a du_buff. One user is
the full stack, each retransmission will increment the refs counter
(which effectively acts as a semaphore). The refs counter is
decremented when a packet is acked. The du_buff is only allowed to be
removed if there is only one user left (the "stack").
When a packet is retransmitted, it is copied in the rdrbuff. This is
to ensure integrity of the packet when multiple layers do
retransmission and it is passed down the stack again.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The rq was removed in a previous commit.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit deprecates ouroboros_init and ouroboros_fini and adds them
as a constructor or destructor, causing these function to be run
automatically when a program that links to the library calls and exits
main(). For this to fully work, the library had to be split so that we
can avoid the irmd calling these functions (the IRMd has to create the
shm structures on which these calls depend).
The library is split in 3 parts: libouroboros-dev, libouroboros-irm
and libouroboros-common. The latter is linked to the other two so that
including libouroboros-dev or libouroboros-irm will also link
libouroboros-common.
|
|
|
|
|
| |
This adds a reordering queue to FRCT so that SDUs can be delivered
in-order when requested.
|
|
|
|
|
|
|
|
| |
This removes the RIB as a datastructure and CDAP as the protocol
between IPCPs. CDAP, the rib and related sources are deprecated. The
link-state protocol policy is udpated to use its own protocol based on
a simple broadcast strategy along a tree. The neighbors struct is
deprecated and moved to the library as a generic notifier component.
|
|
|
|
|
|
|
|
|
|
| |
This revises the build system to have configuration per system
component. System settings can now be set using cmake.
The standard compliance defines were removed from configuration header
and are set in the sources where needed. Also some small code
refactors, such as moving the data for shims out of the ipcp structure
to the respective shims were performed.
|
|
|
|
|
|
|
|
|
|
| |
This adds the basic FRCT mechanisms to the library. Upon flow alloc or
accept an FRCT instance is now created and used when reading or
writing to the flow. The timerwheel has been refactored to allow
recharging timers and removing them and is now part of the
library. The first SDU sent over the connection has the DRF set and
this initializes the connection. Sender and receiver inactivity timers
are added.
|
| |
|
| |
|
| |
|
|
|
|
| |
The CMakeLists files are now properly indented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new RIB is implemented as a tree with doubly linked nodes (parents
keep a link to each child, each child keeps a link to its parent). An
index is kept in a btree using CRC32 hashes of the path name in the
RIB. Nodes keep an SHA3-256 hash value that is unique for the entire
subtree. This allows quick checks to see if two RIB subtrees are in
sync. The event system for the RIB is based on the event system for
flows (fqueue), but implemented completely in dynamic memory using
linked lists. An initial test is performed for the RIB. This PR does
not modify existing code to use the new RIB.
|
|
|
|
|
| |
Adds an implementation of B-trees of order k (k children, min fill is
k/2, max fill k - 1). Useful to implement indexes for faster lookups.
|
| |
|
|
|
|
| |
Test the SHA3 function with known hashes.
|
|
|
|
|
|
|
| |
This adds a hash table that takes 64-bit integers as key and uses
separate chaining on collision. It also adds the PDU Forwarding
Function, which the Flow Manager can use to lookup the fd towards the
next hop. Routing policies will add/update/remove entries in the PFF.
|
|
|
|
| |
Fixes #3
|
|
|
|
|
|
|
| |
The test had a synchronisation issue. Due to rebuild of the shm_du_map
for random access, there was also a hack in the shm_du_map
specifically to run this test. Because of this hack, the decision was
made to drop this test.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This adds a test for the bitmap. During the testing I also removed
some bugs that were present in the bitmap implementation.
|
|
|
|
|
|
| |
Tests should have "_test.c" appended and include the source they are
testing. The build system will find it in the parent directory.
Removed linked_list example test as it is now useless.
|
|
|
|
|
|
|
|
|
|
| |
tests/du_buff.c: tests the du_buff_t structure by creating different
size du_buff_t's and filling it with different size
sdu's at different locations in the du_buff_t
tests/CMakefile.txt: added du_buff test
lib/du_buff.c: fixed unsafe #define adding brackets
|
|
This adds a build target 'check', which executes a test suite for
every daemon/library. Every test suite consists of a test driver that
executes a function in a file with the same name as the function. The
compile_debug script executes the 'check' target to validate there are
no regressions. Packaging is also fixed and the prototype can be
shipped as a tarball.
|