summaryrefslogtreecommitdiff
path: root/include/ouroboros/ipcp-dev.h
Commit message (Collapse)AuthorAgeFilesLines
* build: Update email addressesDimitri Staessens2021-01-031-2/+2
| | | | | | | | The ugent email addresses are shut down, updated to Ouroboros mail addresses. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2021Dimitri Staessens2021-01-031-1/+1
| | | | | | | Happy New Year, Ouroboros! Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* ipcpd: Add congestion avoidance policiesDimitri Staessens2020-12-021-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds congestion avoidance policies to the unicast IPCP. The default policy is a multi-bit explicit congestion avoidance algorithm based on data-center TCP congestion avoidance (DCTCP) to relay information about the maximum queue depth that packets experienced to the receiver. There's also a "nop" policy to disable congestion avoidance for testing and benchmarking purposes. The (initial) API for congestion avoidance policies is: void * (* ctx_create)(void); void (* ctx_destroy)(void * ctx); These calls create / and or destroy a context for congestion control for a specific flow. Thread-safety of the context is the responsability of the flow allocator (operations on the ctx should be performed under a lock). ca_wnd_t (* ctx_update_snd)(void * ctx, size_t len); This is the sender call to update the context, and should be called for every packet that is sent on the flow. The len parameter in this API is the packet length, which allows calculating the bandwidth. It returns an opaque union type that is used for the call to check/wait if the congestion window is open or closed (and allowing to release locks before waiting). bool (* ctx_update_rcv)(void * ctx, size_t len, uint8_t ecn, uint16_t * ece); This is the call to update the flow congestion context on the receiver side. It should be called for every received packet. It gets the ecn value from the packet and its length, and returns the ECE (explicit congestion experienced) value to be sent to the sender in case of congestion. The boolean returned signals whether or not a congestion update needs to be sent. void (* ctx_update_ece)(void * ctx, uint16_t ece); This is the call for the sending side top update the context when it receives an ECE update from the receiver. void (* wnd_wait)(ca_wnd_t wnd); This is a (blocking) call that waits for the congestion window to clear. It should be stateless (to avoid waiting under locks). This may change later on if passing the context is needed for different algorithms. uint8_t (* calc_ecn)(int fd, size_t len); This is the call that intermediate IPCPs(routers) should use to update the ECN field on passing packets. The multi-bit ECN policy bases the value for the ECN field on the depth of the rbuff queue packets will be sent on. I created another call to grab the queue depth as fccntl is write-locking the application. We can further optimize this to avoid most locking on the rbuff. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* lib, ipcpd: piggyback ECDHE on flow allocationDimitri Staessens2020-02-251-4/+8
| | | | | | | | | | | The initial implementation for the ECDHE key exchange was doing the key exchange after a flow was established. The public keys are now sent allowg on the flow allocation messages, so that an encrypted tunnel can be created within 1 RTT. The flow allocation steps had to be extended to pass the opaque data ('piggybacking'). Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 20200.16.0Dimitri Staessens2020-01-021-1/+1
| | | | | Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* ipcpd: Refactor create_r and flow_req_arrDimitri Staessens2019-03-041-4/+2
| | | | | | | | | | | The API calls for the IPCP to inform the IRMd of IPCP creation and incoming flow request had the pid_t in the call. This pid_t is removed and the getpid() call is now placed inside the function. Also refactors the cleanup for the main() functions of some of the lower IPCPs. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2019Dimitri Staessens2019-02-051-1/+1
| | | | | | | Updates the copyright notice in all sources to 2019. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix deallocating non-initialized np1 flowsDimitri Staessens2018-12-291-1/+1
| | | | | | | | This fixes the deallocation of non-initialized IPCP flows. These can occur when some operations are not implemented. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include: Fix QoS include filesDimitri Staessens2018-10-061-0/+1
| | | | | | | A lot of files were unnecessarily including qoscube.h. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Pass qosspec at flow allocationDimitri Staessens2018-10-051-1/+1
| | | | | | | | | | | | The flow allocator now passes the full qos specification to the endpoint, instead of just a cube. This is a more flexible architecture, as it makes QoS cubes internal to the layers. Adds endianness transforms for the flow allocator protocol in the normal IPCP. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-091-1/+1
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-2/+2
| | | | | | | | | | | This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-2/+1
|
* lib: Add call to reserve blocks in rdrbuffdimitri staessens2017-04-261-2/+5
| | | | | | | This adds a call ipcp_sdb_reserve to reserve memory in the rdrbuff without directly writing to a flow. The ipcp_flow_del function was renamed to ipcp_sdb_release. The functions operating on sdbs are moved to their own header.
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-3/+4
| | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* Merge branch 'testing' into beSander Vrijders2017-03-211-2/+2
|\
| * ipcpd: local: Handle failed flow allocationSander Vrijders2017-03-211-3/+3
| | | | | | | | | | | | When the flow_req_arr returned a negative error, it was not handled correctly in the local IPCP, and an access was made into a table with a negative integer. This handles it correctly.
* | Change email addresses to ugent.beSander Vrijders2017-03-031-2/+2
| | | | | | | | | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
* | lib: Remove application entity nameSander Vrijders2017-02-241-1/+0
|/ | | | | The AE name should not be passed over the layer boundaries. If an application has more than one AE it should exchange this in CACEP.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-1/+2
| | | | | | | | The IPCP will now respond with an ipcp_create_r message when it fails, informing the IRMd. Also adds some const qualifiers in the public headers and fixes some formatting in dev.c.
* build: Update licenses and copyrightdimitri staessens2017-01-091-1/+1
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-031-1/+2
| | | | | | | | | | Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
* ouroboros: Correct license statementsdimitri staessens2016-12-241-10/+10
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* ipcpd, lib: Refactor normal ipcp and cdapdimitri staessens2016-12-241-2/+2
| | | | | Refactors the normal IPCP fmgr and ribmgr, and modifies the API for cdap so that no callbacks are needed.
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-121-4/+3
| | | | | | | | | | | | | | | | Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT.
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-261-0/+2
| | | | | | | | | | | 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.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-3/+0
| | | | | | | | 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.
* lib: Add non-copy reading from fd for IPCPsdimitri staessens2016-10-071-2/+5
|
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-0/+50
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