summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix exit bug in dev.cdimitri staessens2017-10-231-0/+4
| | | | | | | | | | If the library init() fails, the fini() call tries to access unreleased resources. The fix resets the ai struct to 0 if init() fails and checks a heap pointer for NULL before the fini() accesses internals. Signed-off-by: dimitri staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Fix documentation issues0.7dimitri staessens2017-10-172-7/+4
| | | | | | | | Removed a self-reference in ouroboros-tutorial. Fixes some style issues in ouroboros(8). Signed-off-by: dimitri staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* Merged in dstaesse/ouroboros/be-doc-ouroboros (pull request #629)dimitri staessens2017-10-1712-29/+646
|\ | | | | | | doc: Add general documentation
| * doc: Add general documentationdimitri staessens2017-10-1712-29/+646
|/ | | | | | | | | This adds user documentation for the Ouroboros User Manual in man sections 7 and 8. It consists of a general man page, a tutorial and a glossary. It also fixes and updates other manpages in the Ouroboros Programmer's Manual.
* Merged in dstaesse/ouroboros/be-build-bugs (pull request #628)dimitri staessens2017-10-141-1/+1
|\ | | | | | | build: Set bugreport URL
| * build: Set bugreport URLdimitri staessens2017-10-141-1/+1
|/
* Merged in dstaesse/ouroboros/be-deprecate-ouroboros-init-fini (pull request ↵dimitri staessens2017-10-1443-235/+123
|\ | | | | | | | | | | #626) Be deprecate ouroboros init fini
| * lib: Deprecate ouroboros_init and ourboros_finidimitri staessens2017-10-1443-235/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merged in dstaesse/ouroboros/be-fix-multiblock (pull request #627)dimitri staessens2017-10-144-2/+7
|\ \ | | | | | | | | | lib: Re-enable multi-block support
| * | lib: Re-enable multi-block supportdimitri staessens2017-10-134-2/+7
| | | | | | | | | | | | | | | | | | Multi-block support was forgotten during the update of the build system. This enables it again and fixes some bugs when it is disabled and larger SDUs are sent.
* | | Merged in dstaesse/ouroboros/be-shim-eth-clang (pull request #625)dimitri staessens2017-10-141-1/+9
|\ \ \ | |/ / |/| / | |/ ipcpd: Fix unreachable code in shim-eth-llc
| * ipcpd: Fix unreachable code in shim-eth-llcdimitri staessens2017-10-111-1/+9
|/ | | | | Closing the file descriptor after a while(true) loop led to clang compiler errors. This is fixed by adding a cleanup handler.
* Merged in dstaesse/ouroboros/be-fix-ls (pull request #624)dimitri staessens2017-10-071-1/+4
|\ | | | | | | ipcpd: Handle cancellation while writing LSAs
| * ipcpd: Handle cancellation while writing LSAsdimitri staessens2017-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | This adds a cleanup handler to ensure the lock is released in the event that the thread is cancelled during a write. An alternative solution could be to make the flow write in a non-blocking way (only the blocking write contains an execution path that has a cancellation point). Fixes #55
* | Merged in dstaesse/ouroboros/be-irmd-version (pull request #623)dimitri staessens2017-10-072-27/+37
|\ \ | |/ |/| | | irmd: Add option to print version
| * irmd: Add option to print versiondimitri staessens2017-10-062-27/+37
|/ | | | | | | | | This adds the --version option to the IRMd. With this option it will print the version of Ouroboros to stdout and exit. Checking the version does not require root privileges. Also fixes calling log functions before log_init() and after log_fini().
* Merged in dstaesse/ouroboros/be-flow-cleanup (pull request #622)dimitri staessens2017-10-041-22/+1
|\ | | | | | | irmd: Don't destroy flows before IPCPs
| * irmd: Don't destroy flows before IPCPsdimitri staessens2017-10-041-22/+1
|/ | | | | | This allows the IPCPs to call ouroboros_fini() and clean up their buffers and drastically reduce chances of getting an assertion error that some rbuffs are not empty when shutting down the irmd.
* Merged in dstaesse/ouroboros/be-tpm-cancel (pull request #621)dimitri staessens2017-10-029-255/+261
|\ | | | | | | lib: Cancel tpm threads instead of marking exit
| * lib: Cancel tpm threads instead of marking exitdimitri staessens2017-09-309-255/+261
|/ | | | | | | | | This makes the threadpool use pthread_cancel instead of setting an exit flag that threadpool managed threads check periodically. This drastically reduces CPU consumption in the irmd when running a lot of applications. It requires cancellation handlers in the ipcp and irmd to be implemented to ensure safe cancellation during operation and shutdown.
* Merged in sandervrijders/ouroboros/be-lfas (pull request #620)Sander Vrijders2017-09-2910-60/+285
|\ | | | | | | ipcpd: normal: Add Loop-Free Alternates routing
| * ipcpd: normal: React to flow events in link state policySander Vrijders2017-09-293-4/+56
| | | | | | | | | | | | This will let the link state policy react to flow up and down events by notifying the PFFs of the routing instances of this event so they can take an appropriate action.
| * ipcpd: normal: Add Loop-Free Alternates routingSander Vrijders2017-09-298-56/+229
|/ | | | | | This adds the Loop-Free Alternates (LFA) policy. In case a link goes down a LFA may be selected to route the SDUs on without causing loops instead of the main hop that just went down.
* Merged in sandervrijders/ouroboros/be-routing (pull request #617)Sander Vrijders2017-09-264-189/+288
|\ | | | | | | Be routing
| * ipcpd: normal: Add refcount to graph edgesSander Vrijders2017-09-263-22/+53
| | | | | | | | | | This adds a refcount to the graph edges so that it is only included in the calculation if both sides announced it.
| * ipcpd: normal: Keep index in vertex structSander Vrijders2017-09-252-27/+24
| | | | | | | | | | This keeps the index in the vertex struct so that is more easily available during Dijkstra.
| * ipcpd: normal: Simplify Dijkstra implementationSander Vrijders2017-09-251-25/+17
| | | | | | | | | | | | This simplifies the Dijkstra implementation by immediately setting the correct next hop during Dijkstra instead of looping through the list of predecessors afterwards.
| * ipcpd: normal: Simplify internal graph functionsSander Vrijders2017-09-251-38/+26
| | | | | | | | | | This simplifies several internal graph functions by passing an array of bools instead of an array of vertices.
| * ipcpd: normal: Return list as routing tableSander Vrijders2017-09-254-106/+197
| | | | | | | | | | | | This returns a list as routing table instead of a pointer to a pointer to a pointer, which simplifies the looping through the routing table and makes it more extensible for future additions.
* | Merged in sandervrijders/ouroboros/be-dht-fix (pull request #618)Sander Vrijders2017-09-261-3/+3
|\ \ | | | | | | | | | ipcpd: normal: Set clock to realtime clock
| * | ipcpd: normal: Set clock to realtime clockSander Vrijders2017-09-261-3/+3
| |/ | | | | | | | | | | A pthread_cond_wait was using the pthread_cond_clock and thereby timing out constantly, consuming 100% CPU. This changes it to use the realtime clock.
* | Merged in dstaesse/ouroboros/be-sched-mul (pull request #619)dimitri staessens2017-09-263-10/+14
|\ \ | |/ |/| | | ipcpd: Add multiplier to scale scheduler threads
| * ipcpd: Add multiplier to scale scheduler threadsdimitri staessens2017-09-253-10/+14
|/
* Merged in dstaesse/ouroboros/be-dht-deadlock-fix (pull request #616)dimitri staessens2017-09-241-27/+41
|\ | | | | | | ipcpd: Fix deadlock in DHT
| * ipcpd: Fix deadlock in DHTdimitri staessens2017-09-241-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | The lookup_update was waiting for the LU_INIT state to resolve under dht->lock which prevented that update. This PR fixes this bug, but leaves a (very rare) bug when the lookup_destroy is called while the lookup_update is waiting for the LU_INIT state to resolve. The solution also is a (harmless) lock inversion, but this is also not the best. Fixes #51 Fixes #52
* | Merged in dstaesse/ouroboros/be-dht-debugging (pull request #615)dimitri staessens2017-09-246-319/+417
|\| | | | | | | ipcpd: Fix compilation of DHT
| * ipcpd: Add threadpool manager to DHTdimitri staessens2017-09-246-319/+417
|/ | | | | | | | | | | This adds a threadpool manager to the DHT. This was needed because the detached thread could cause a data race on shutdown. The threadpool manager is revised to allow multiple instances in a single program. The irmd and ipcp now store commands in a buffer (list) instead of a single buffer before passing it to handler threads.
* Merged in dstaesse/ouroboros/be-bugfixes (pull request #614)dimitri staessens2017-09-233-81/+129
|\ | | | | | | Some bugfixes
| * ipcpd: Don't publish DHT entries under lockdimitri staessens2017-09-231-30/+85
| |
| * lib: Clean up bitmap implementationdimitri staessens2017-09-232-51/+44
| | | | | | | | | | | | There was a return -1 in the allocate call which is unsafe since -1 may be a valid id in the bitmap. Since it's a data structure for internal use, I replaced the NULL checks with assertions.
* | Merged in dstaesse/ouroboros/be-bugfixes (pull request #613)dimitri staessens2017-09-232-9/+17
|\| | | | | | | Some bugfixes
| * ipcpd: Lock dht before reading parametersdimitri staessens2017-09-231-7/+14
| |
| * ipcpd: Fix data race in shim-udpdimitri staessens2017-09-231-2/+3
| | | | | | | | | | This fixes a data race in the shim-udp where the alloc_lock was released before the ipcpi.alloc_id was set.
* | Merged in sandervrijders/ouroboros/be-lockless (pull request #612)Sander Vrijders2017-09-221-2/+2
|\ \ | | | | | | | | | lib: Disable lockless rbuff by default
| * | lib: Disable lockless rbuff by defaultSander Vrijders2017-09-221-2/+2
|/ / | | | | | | | | This disables the lockless rbuff by default since it is less stable and tested.
* | Merged in dstaesse/ouroboros/be-dht-update-fix (pull request #611)dimitri staessens2017-09-221-1/+4
|\ \ | |/ |/| | | ipcpd: Fix DHT recursive lookup
| * ipcpd: Fix DHT recursive lookupdimitri staessens2017-09-221-1/+4
|/
* Merged in dstaesse/ouroboros/be-hashtable (pull request #610)dimitri staessens2017-09-212-0/+5
|\ | | | | | | lib: Include string.h in hashtable.c for memcpy
| * ipcpd: Mark len parameter as unused in simple_pffdimitri staessens2017-09-211-0/+4
| |
| * lib: Include string.h in hashtable.c for memcpydimitri staessens2017-09-211-0/+1
|/