summaryrefslogtreecommitdiff
path: root/src/ipcpd
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: normal: Fix bugs in connection establishmentSander Vrijders2016-10-274-46/+58
| | | | This fixes some bugs in connection establishment over the normal IPCP.
* ipcpd: Fix bad lock in shim-udpdimitri staessens2016-10-261-11/+10
|
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-265-145/+18
| | | | | | | | | | | The steps for flow deallocation have been further refined. An operation ipcp_flow_fini() which wait for all SDUs to be read from a flow has been added. The shim IPCPs and the local IPCP have been adapted to this new API. Deallocation messages have been removed from the shim IPCPs, since there is insufficient state synchronisation between them to make this work reliably.
* ipcpd: shim-udp: Add check for directory entrySander Vrijders2016-10-261-0/+5
| | | | | | A check was missing in the shim UDP if the destination was already present in the directory, in which case no further queries were needed.
* Merged in sandervrijders/ouroboros/be-ipcp-threads (pull request #283)dimitri staessens2016-10-262-31/+49
|\ | | | | | | ipcpd: Add threadpool for main loop
| * ipcpd: Add threadpool for main loopSander Vrijders2016-10-262-31/+49
| | | | | | | | | | | | | | This adds a threadpool for the main loop of the IPCPs. Before there was a single thread handling each request, which could result in starvation since performing name queries at the same time as enrolling a normal IPCP was impossible.
* | Merged in dstaesse/ouroboros/be-qos (pull request #279)Sander Vrijders2016-10-261-1/+2
|\ \ | |/ |/| | | lib: API for accepting flows with QoS
| * lib: API for accepting flows with QoSdimitri staessens2016-10-251-1/+2
| |
* | Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-269-172/+520
|\ \ | | | | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * | lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-269-172/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to query IPCPs if a name can be reached through them, e.g. if a name is available in a DIF. This means that in the shim-udp a DNS query is performed, in the shim-eth-llc an ARP-like query has been added, in the local a check is done to see if the name is registered, and in the normal currently no application is reachable through it.
* | | ipcpd: Fix memory leaksdimitri staessens2016-10-252-31/+35
| |/ |/| | | | | | | Fixes memory leaks associated with the dif_name (which doesn't need to be maintained in shim DIFs) and the fqueue for the N + 1 flows.
* | Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into bedimitri staessens2016-10-243-45/+78
|\|
| * Merged in dstaesse/ouroboros/be-fix-alloc (pull request #276)Sander Vrijders2016-10-241-0/+1
| |\ | | | | | | | | | lib: Stabilise flow allocation
| * | ipcpd: Fix log message and lockdimitri staessens2016-10-231-3/+2
| | | | | | | | | | | | | | | Remote requests for a flow that's locally deallocated should not generate an error. Sending messages should not be under lock.
| * | ipcpd: Improve locking in ipcp-datadimitri staessens2016-10-232-42/+76
| | | | | | | | | | | | This solves some potential data races in the shims.
* | | ipcpd: Fix memleaks in local IPCPdimitri staessens2016-10-241-11/+14
| |/ |/|
* | lib: Stabilise flow allocationdimitri staessens2016-10-231-0/+1
|/ | | | | | | Deallocation was reverted to a synchronoous operation between the AP, IRMd and IPCP in order to avoid inconsistent states of the port_id. Fixes some memory leaks, particularly the shm_flow_set is now closed upon deallocation.
* dev, ipcp: Fix setting default flow optionsdimitri staessens2016-10-231-9/+2
| | | | | The default flow options were not set when a flow allocation request arrives remotely. This went unnoticed due to a previous bug.
* build: Remove the gethostbyname checkdimitri staessens2016-10-231-17/+0
| | | | | gethostbyname is included in POSIX 2001. Ouroboros requires at least POSIX 2001 and recommends POSIX 2008 for stable builds.
* ipcpd: Fix unused variabledimitri staessens2016-10-231-1/+4
|
* build: Fix missing includedimitri staessens2016-10-221-0/+1
| | | | | | CheckLibraryExists was not included. Apparently the CHECK_FUNCTION_EXISTS call fails with the strict prototyping flag turned on.
* build: Compile with strict conversiondimitri staessens2016-10-2214-79/+97
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-217-4/+50
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* Merged in dstaesse/ouroboros/be-demux (pull request #267)Sander Vrijders2016-10-215-143/+264
|\ | | | | | | lib: Demultiplex the fast path
| * lib: Demultiplex the fast pathdimitri staessens2016-10-215-143/+264
| | | | | | | | | | | | | | | | The fast path will now use an incoming ring buffer per flow per process. This necessitated the development of a new method for the asynchronous io call, which is now based on an event queue system for scalability (fqueue). The ipcpd's and tools have been updated to this API.
* | ipcpd: normal: Avoid allocating flow over unenrolled IPCP.Sander Vrijders2016-10-171-0/+10
|/ | | | | There was no check to see if the normal IPCP was enrolled or not when a flow allocation request is done.
* lib, dev: Implement read/write options for flowsdimitri staessens2016-10-161-0/+2
| | | | | | | Added the missing implementation of setting read/write options for flows. This allows applications to block the fast path for remotes. IPCPs can use this to block the fast path for the N + 1 flow when receiving remote deallocation requests.
* lib: Stabilize fast flow deallocation over local IPCPdimitri staessens2016-10-151-16/+19
|
* lib: Fix flow deallocation logicdimitri staessens2016-10-133-0/+6
| | | | | Both the N and N-1 entity must now call flow_dealloc for the port_id to be released.
* ipcpd: normal: Improve upon the internal designSander Vrijders2016-10-1211-574/+411
| | | | | | | | This commit will remove the RMT component from the normal IPCP, as some of its functionality would else be duplicated in the FMGR. Now all reading from flows, either N-1 or N+1 is done in the FMGR, then either passed to the FRCT or a lookup is performed in the PFF (not there yet) and the PDU is forwarded.
* ipcpd: normal: First version of the fast path bootstrapSander Vrijders2016-10-1111-209/+697
| | | | | | | This is the first version of the fast path bootstrap in the normal IPCP. It sets up a connection with the other end, and creates the appropriate data structures. N+1 and N-1 SDUs are read and written and passed through the right components.
* lib: Add non-copy reading from fd for IPCPsdimitri staessens2016-10-072-2/+2
|
* lib, dev: Add asynchronous deallocationdimitri staessens2016-10-071-4/+7
| | | | | Flow deallocation from the application will immediately return (void call). The IRMd will not send a reply message.
* ipcpd: Filter traffic on shim-eth-llcdimitri staessens2016-10-061-6/+28
| | | | Now correctly handles and drops non-ouroboros traffic.
* ipcpd: shim-eth-llc: Use correct SAP to lookup in the tableSander Vrijders2016-10-051-3/+5
| | | | | Upon deallocation, the remote's SAP was being used to lookup the fd instead of our own SAP. This resulted in strange behaviour.
* lib, ipcpd: Fix bad lockingSander Vrijders2016-10-051-5/+2
| | | | | | Some locks were taken at an inappropriate time, causing the shim-eth-llc to block indefinitely upon shutdown and causing flow allocation to halt since a response could never be given.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-0413-2234/+1103
| | | | | | | | | | | | IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5
* ipcpd: normal: Fix crapped up indentationSander Vrijders2016-09-071-48/+48
| | | | There was some crapped up indentation in the crc32 source file.
* Merged in sandervrijders/ouroboros/be-shm-pci (pull request #247)dimitri staessens2016-09-0711-133/+324
|\ | | | | | | ipcpd: normal: Add operations to get and set the PCI
| * ipcpd: normal: Add operations to get and set the PCISander Vrijders2016-09-0711-133/+324
| | | | | | | | | | | | | | | | | | This adds the operations needed in the normal IPCP to get and set the Protocol Control Information. It allows to allocate or release space in the current DU. The struct pci can be serialized into newly allocate space. Vice versa, a struct pci can be deserialized given a DU. It allows for decreasing the TTL in the DU and for calculating the CRC32. The TTL and CRC32 can now be selected when creating a new DIF.
* | ipcpd: Add missing include for FreeBSDdimitri staessens2016-09-071-0/+1
| |
* | Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-025-12/+12
|\ \ | |/ |/| | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-025-12/+12
| | | | | | | | Fast path is split in north and southbound paths.
* | Merged in dstaesse/ouroboros/be-ipcp-dev (pull request #237)Sander Vrijders2016-09-023-3/+3
|\ \ | |/ |/| | | lib: ipcp: Decouple flow_dealloc
| * lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-023-3/+3
| | | | | | | | Sending a dealloc to the irmd moved to its own call.
* | lib: Change rdrbuff API to use correct typesSander Vrijders2016-09-011-1/+1
|/ | | | | | The head and tail alloc and release operations were taking an int to identify the idx instead of a ssize_t. The size was a ssize_t instead of a size_t.
* lib, ipcp: Compile on Apple junkdimitri staessens2016-08-303-1/+7
| | | | | | Disables robust mutexes and clock attributes for condition variables for compatibility with OSX (SUSv2). Implements clock_gettime and adds some defines for OSX compatibility in time_utils.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-295-57/+75
| | | | | | | | | | The shm_du_map is renamed to shm_rdrbuff to reflect the Random Deletion Ringbuffer used in the implementation. The close_on_exit call is removed and SDUs are cleaned up by the application in the ap_fini() call. This required a non-blocking peek() operation in the shm_ap_rbuff. Some initial implementation for future support of qos cubes has been added to the shm_rdrbuff.
* ipcpd: Report pid on shutdowndimitri staessens2016-08-264-8/+8
| | | | IPCPs will report their pid on shutdown for faster debugging.
* ipcpd, normal: Safe handling of CDAP requestsdimitri staessens2016-08-256-77/+282
| | | | Destruction of the object in the reply stage was unsafe.