summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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-073-10/+45
|
* lib, dev: Add asynchronous deallocationdimitri staessens2016-10-074-55/+72
| | | | | Flow deallocation from the application will immediately return (void call). The IRMd will not send a reply message.
* lib: Fix shutdown with pending SDUsdimitri staessens2016-10-062-2/+4
| | | | | The SDU's were not correctly removed upon shutdown, peek should be pop.
* ipcpd: Filter traffic on shim-eth-llcdimitri staessens2016-10-063-7/+31
| | | | 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-052-7/+4
| | | | | | 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-0432-2763/+1975
| | | | | | | | | | | | 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
* lib: Fix shm for evil devicesdimitri staessens2016-09-083-6/+6
| | | | | | Cupertino's finest don't seem to support a write call with a filedescriptor that points to a shared memory file. ENOTSUP is not mentioned in their manpage either. Classic.
* 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-0715-239/+372
|\ | | | | | | ipcpd: normal: Add operations to get and set the PCI
| * ipcpd: normal: Add operations to get and set the PCISander Vrijders2016-09-0715-239/+372
| | | | | | | | | | | | | | | | | | 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.
* | lib: Set umask for file creation permissionsdimitri staessens2016-09-074-17/+12
| | | | | | | | | | Permissions are now set correctly upon creation, removing the need to call fchmod.
* | ipcpd: Add missing include for FreeBSDdimitri staessens2016-09-071-0/+1
| |
* | lib: Add lazy copy of flow_setdimitri staessens2016-09-071-8/+16
| | | | | | | | | | | | The flow_set now has a safe copy which is threadsafe for the select call without needing a lock. This greatly speeds up consecutive select calls.
* | irmd: Fix register with unenrolled IPCPs in systemdimitri staessens2016-09-061-0/+3
| | | | | | | | | | If there are unregistered IPCPs (no DIF name set) the lookup should skip over them without segfaulting.
* | lib: dev: Provide a set of fds to flow_selectdimitri staessens2016-09-065-28/+188
| | | | | | | | | | | | | | The flow_select call now takes as a parameter a flow_set_t, which specifies a set of flow descriptors that will unblock the select call when an SDU for one of them arrives. The select call has been moved to its own header.
* | lib: dev: Add fd lookup tabledimitri staessens2016-09-031-23/+25
| |
* | lib: dev: Refactordimitri staessens2016-09-031-182/+188
| | | | | | | | | | Renamed _ap_instance to ai, adds a char * daf_name (to be set by ipcps in ipcp-dev.h, later to be set when we generalise enrolment to DAFs).
* | Merged in dstaesse/ouroboros/be-split-fp (pull request #239)Sander Vrijders2016-09-023-7/+7
|\ \ | | | | | | | | | src: Fix grammar (SDU's -> SDUs)
| * | src: Fix grammar (SDU's -> SDUs)dimitri staessens2016-09-023-7/+7
| | |
* | | Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-029-29/+70
|\| | | |/ |/| | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-029-29/+70
| | | | | | | | Fast path is split in north and southbound paths.
* | Merged in dstaesse/ouroboros/be-ipcp-dev (pull request #237)Sander Vrijders2016-09-024-36/+38
|\ \ | |/ |/| | | lib: ipcp: Decouple flow_dealloc
| * lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-024-36/+38
| | | | | | | | Sending a dealloc to the irmd moved to its own call.
* | lib: Change rdrbuff API to use correct typesSander Vrijders2016-09-012-9/+9
|/ | | | | | 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.
* irmd: Fix registering AP-I before binddimitri staessens2016-09-011-2/+7
|
* lib, rdrbuff: Fix fast path lockupdimitri staessens2016-09-011-2/+5
| | | | Adds missing condition signals.
* lib, shm_rdrbuff: Fix preprocessor definedimitri staessens2016-08-311-15/+15
|
* irmd: Fix binding after registeringdimitri staessens2016-08-311-0/+5
| | | | | Flow will now allocate correctly when the name is registered in a DIF before it is bound to an AP.
* tools, irm: Fix segfault with missing parametersdimitri staessens2016-08-311-2/+2
|
* lib, ipcp: Compile on Apple junkdimitri staessens2016-08-307-35/+111
| | | | | | 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-2911-865/+950
| | | | | | | | | | 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.
* lib, cdap: Fix message handlerdimitri staessens2016-08-291-1/+1
| | | | When getting a DELETE opcode, create was called instead of delete.
* cdap: Fix destructiondimitri staessens2016-08-271-6/+3
| | | | | Destroying NULL should succeed. Resources need to be freed even if flow_dealloc fails.
* irmd: Add state checks to api_entrydimitri staessens2016-08-272-2/+10
| | | | Prevents double destruction.
* ipcpd: Report pid on shutdowndimitri staessens2016-08-264-8/+8
| | | | IPCPs will report their pid on shutdown for faster debugging.
* irmd: Revise shutdown proceduredimitri staessens2016-08-261-13/+14
| | | | | Flows are deallocated first, then the socket is closed to prevent IPCPs hanging on the connect.
* ipcpd, normal: Safe handling of CDAP requestsdimitri staessens2016-08-256-77/+282
| | | | Destruction of the object in the reply stage was unsafe.
* irmd: Remove stale sourcesdimitri staessens2016-08-252-191/+0
|
* tools: Fix memleak in irm_ipcp_enrolldimitri staessens2016-08-251-2/+5
|
* ipcpd: normal: Fix uninitialized valueSander Vrijders2016-08-251-6/+9
| | | | This removes the ret value which was not being set correctly.
* Merged in dstaesse/ouroboros/be-irmd-fix (pull request #222)Sander Vrijders2016-08-252-8/+18
|\ | | | | | | Fix locks
| * ipcpd, normal: Fix bad lockdimitri staessens2016-08-251-3/+4
| |
| * irmd: Fix bad lockdimitri staessens2016-08-251-5/+14
| |
* | Merged in dstaesse/ouroboros/be-ipcp-locks (pull request #221)Sander Vrijders2016-08-248-460/+389
|\| | | | | | | ipcpd: Revised locking
| * ipcpd: Revised lockingdimitri staessens2016-08-248-460/+389
| | | | | | | | | | | | The state lock was reverted to an rwlock to avoid interference of management functions with the fast path. IPCPs now close without calling unsafe functions in the signal handler.
* | Merged in sandervrijders/ouroboros/be-normal-flow-alloc (pull request #219)dimitri staessens2016-08-248-33/+646
|\ \ | |/ |/| | | ipcpd: normal: Add initial steps for N+1 flow allocation
| * ipcpd: normal: Add initial steps for N+1 flow allocationSander Vrijders2016-08-238-33/+646
| | | | | | | | | | | | | | | | | | | | | | This adds the initial framework for flow allocation between two N+1 endpoints. The FMGR will receive flow allocation requests and will create a connection as a result, addressed to the right address, it will also pass a flow allocation message to this address. Upon receipt on the other side, the FMGR will be receive a flow allocation message and a pointer to a new connection. The FMGR can then accept or destroy the connection. This commit also introduces the RMT function, which is needed by the FRCT to forward its SDUs on the right file descriptor.
| * tools: Add missing filesdimitri staessens2016-08-212-0/+161
| |