summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | lib: Fix initial automated repeat-requestDimitri Staessens2018-10-092-10/+15
| | | | | | | | | | | | | | | | | | This fixes rudimentary automated repeat-request ARQ to correctly configure the both connection records and use the receiver seqno. The rto variable is moved out of the connection record. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-10-092-89/+0
|\|
| * lib: Define QoS specs inside header file0.12.1Sander Vrijders2018-10-092-89/+0
| | | | | | | | | | | | | | | | | | The QoS specs were defined in the source file instead of in the header file, which resulted in uninitialized structs being used, which gave rise to weird behavior in the library. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-10-0673-1261/+1433
|\|
| * lib: Keep track of highest delivered seqnoDimitri Staessens2018-10-061-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | The FRCT kept only a left window edge in the receiver connection window, however, it needs to keep track of the left window edge (highest ACK'd sequence number) and the highest delivered sequence number, so it can delay ACKs that cannot be piggybacked. TCP recommends at most 500 ms for delayed ACKs (probably good to keep it near half of RTO). 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-067-6/+3
| | | | | | | | | | | | | | 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: Split error checking from FRCTDimitri Staessens2018-10-054-44/+58
| | | | | | | | | | | | | | | | This splits off the CRC from FRCT so it can be set independently. Ouroboros now allows raw flows with error checking. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Remove dt_const header from normal IPCPSander Vrijders2018-10-051-39/+0
| | | | | | | | | | | | | | | | The dt_const header is a remnant from an earlier version of the DT PCI. It can be safely removed. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * lib: Rename port_id to flow_idDimitri Staessens2018-10-0513-171/+171
| | | | | | | | | | | | | | Renames port_id to flow_id according to updated nomenclature. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Shorten packet_scheduler to pschedSander Vrijders2018-10-055-63/+63
| | | | | | | | | | | | | | | | This shortens packet_scheduler to psched, which results in more readable code. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd, lib, irmd, tools: Change SDU to packetSander Vrijders2018-10-0525-240/+244
| | | | | | | | | | | | | | | | This will change SDU (Service Data Unit) to packet everywhere. SDU is OSI terminology, whereas packet is Ouroboros terminology. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Replace SAP with EID in raptor IPCPSander Vrijders2018-10-051-74/+74
| | | | | | | | | | | | | | | | This replaces Service Access Point with Endpoint Identifier in the raptor IPCP, since it better fits the Ouroboros terminology. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * lib: Pass qosspec at flow allocationDimitri Staessens2018-10-0524-233/+367
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ipcpd: Use non-blocking socket in Ethernet IPCPSander Vrijders2018-10-031-3/+17
| | | | | | | | | | | | | | | | | | | | Since the Ethernet IPCP now has multiple reader threads it was possible that both exit the select call, which caused one of the two threads to block on the recv call. This makes the socket non-blocking so that the recv call simply fails. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * build: Prioritize raw socket API in buildSander Vrijders2018-10-031-15/+18
| | | | | | | | | | | | | | | | This will change the build to exclusively select one raw socket API in case multiple are present in the sytem, which will simplify the code. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Bypass Qdisc in Ethernet IPCPSander Vrijders2018-10-031-0/+8
| | | | | | | | | | | | | | | | Since Linux kernel 3.14 there is the option to bypass the kernel Qdisc. This will speed up the Ethernet IPCP. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Fix build for netmap enabled Ethernet IPCPSander Vrijders2018-10-032-7/+9
| | | | | | | | | | | | | | | | | | There were some compilation issues introduced by adding the interface monitor to the Ethernet IPCP. Furthermore it was not possible to select between raw sockets or netmap if both were available. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Fix bad lock in Ethernet IPCPSander Vrijders2018-10-031-1/+1
| | | | | | | | | | | | | | | | An unlock was called twice instead of a lock/unlock sequence, causing a data race. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Add multithreading to Ethernet IPCPDimitri Staessens2018-10-033-31/+63
| | | | | | | | | | | | | | | | | | This adds multiple reader and writer threads, configurabe via cmake with IPCP_ETH_RD_THR and IPCP_ETH_WR_THR. Improves ethernet IPCP throughput, which looks to be limited by the raw socket calls. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Merge dt_pci into dt sourceDimitri Staessens2018-10-026-192/+91
| | | | | | | | | | | | | | | | This merges the dt_pci code into the dt source. It simplifies the code base, and allows inline compilation. Removes unnecessary includes. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * lib: Check return values init functionsSander Vrijders2018-09-286-31/+58
| | | | | | | | | | | | | | | | | | This will check the return values of init functions so that the code is more robust. It also removes a duplicate init in the timerwheel, checks for buffer overflows in the RIB and checks string lengths. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Add return value checks to UDP IPCPSander Vrijders2018-09-271-17/+37
| | | | | | | | | | | | | | Some return value checks were missing in the UDP IPCP. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Fix test of routing table calculationSander Vrijders2018-09-271-4/+4
| | | | | | | | | | | | | | | | | | A previous commit changes the signature of the function that calculates the routing table. The test was not changed accordingly, making make check fail. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * ipcpd: Remove double close in Ethernet IPCPSander Vrijders2018-09-271-2/+1
| | | | | | | | | | | | | | | | | | There was a double close of a fd in the Ethernet IPCP. It also passes the correct max length to a memcpy (a strlen of the source string was used previously). Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * irmd: Add missing unlocks and avoid NULL dereferenceSander Vrijders2018-09-273-26/+26
| | | | | | | | | | | | | | | | There were missing unlocks in certain error conditions and some NULL pointers were passed to strcmp which is undefined behavior. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * tools: Fix memleaks and buffer overflows in irm toolSander Vrijders2018-09-273-3/+12
| | | | | | | | | | | | | | | | This fixes some memleaks and potential buffer overflows in the irm tool. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * lib: Remove configuration from FRCTDimitri Staessens2018-09-272-64/+17
| | | | | | | | | | | | | | | | This removes configuration from the FRCT protocol to send it during flow allocation. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * include: Remove _DEFAULT_SOURCE in endian.hDimitri Staessens2018-09-2725-3/+101
| | | | | | | | | | | | | | | | This removes the _DEFAULT_SOURCE definition in the endian header as it should not be there. This avoids double and conflicting definitions. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Simplify routing algorithm selectionSander Vrijders2018-09-143-89/+85
| | | | | | | | | | | | | | | | | | | | Previously there was a separate function per routing algorithm selection, when in fact the algorithms all take as input a graph and output a routing table, making it possible to place them in a single function. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | lib: Support for rudimentary retransmissionDimitri Staessens2018-07-278-403/+326
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ipcpd: Check if mgmt flow event is FLOW_PKT0.11.12Sander Vrijders2018-07-271-1/+4
| | | | | | | | | The management flows were considering every event to be a FLOW_PKT event, when in fact it could also be a flow down or up event, resulting in indefinite reads. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Fix sequence number check for link state0.11.11Sander Vrijders2018-07-251-11/+11
| | | | | | | | | Commit a3903da659e introduced sequence number for the LSAs to make it more robust, but the check was not done properly, and the seqno was always changed regardless of whether it was an old LSA or not. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Enhance irm connect and disconnect command0.11.10Sander Vrijders2018-07-232-26/+34
| | | | | | | | | | This enhances the irm connect and irm disconnect command to allow creating connections between IPCPs based on wildcard matching for the component name. In case no component was specified it sets up connections between all possible components. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Only forward new LSAs of the LSDBSander Vrijders2018-07-151-17/+36
| | | | | | | | | | | | This will add a sequence number to the Link State Advertisements so that upon receiving a LSA we can check if we need to forward the LSA or not. If we already have the LSA with the received seqno in the LSDB we do not forward it. This allows for setting up a management network that has loops since the spanning tree upon which the LSAs are sent is pruned on every hop. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: React to flow events activelySander Vrijders2018-07-044-18/+55
| | | | | | | | This adds the infrastructure to actively react to flow up, down and deallocated events. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Add unidirectional test to operfSander Vrijders2018-06-254-88/+208
| | | | | | | | This adds a unidirectional test to operf, which is handy for testing unidirectional streams. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Recalculate PFF only if LSDB changedSander Vrijders2018-06-191-18/+50
| | | | | | | | | This will add a flag so the PFF is only recalculated if the LSDB has changed. It also removes the instant recalculation of the LSDB if a new neighbor is added, since this might cause instabilities. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Change connection down to flow downSander Vrijders2018-06-197-19/+82
| | | | | | | | | | The DT component was flagging a connection as down and passing the fd that was down. Of course the other components expect a connection instead of just a fd. Now the connection manager will listen to flow up and down events, and flag the connection up or down if needed. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* Merge branch 'testing' into beSander Vrijders2018-06-151-2/+6
|\
| * lib: Mark flows down on finiDimitri Staessens2018-06-151-2/+6
| | | | | | | | | | | | | | This will mark flows down when they are finalized. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-06-151-2/+3
|\|
| * ipcpd: Fix RIB output for dt componentDimitri Staessens2018-06-151-2/+3
| | | | | | | | | | | | | | | | The RIB output length was fixed for 3 qos cubes. Now it will scale correctly if QoS cubes are added or removed. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-06-138-186/+89
|\|
| * lib: Use macros for all time utility functions0.11.9Dimitri Staessens2018-06-136-163/+60
| | | | | | | | | | | | | | | | | | This replaces the time utility functions with macros. This avoids using library functions in the tools and also slightly speeds up the implementation. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Get mtu using ioctl before hw addressDimitri Staessens2018-06-131-6/+6
| | | | | | | | | | | | | | | | | | The SIOCGIFMTU command uses the ifr struct, which is a union, so it can't store the hw address and the MTU at the same time. We now call SIOCGIFMTU and set the MTU before SIOCGIFHWADDR. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd: Fix MTU handling in ethDimitri Staessens2018-06-131-16/+22
| | | | | | | | | | | | | | | | This fixes the MTU handling in eth. Buffers are now allocated to smaller size. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * lib: Change prefix to mountpt in RIBSander Vrijders2018-06-131-1/+1
| | | | | | | | | | | | | | | | The build failed if FUSE was disabled, since instead of voiding mountpt, prefix, an unexisting variable, was voided. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | tools: Add newlines to printf statements in opingSander Vrijders2018-06-082-3/+3
| | | | | | | | | | | | | | | | There were some missing newlines in printf statements in oping. This adds them. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-06-082-136/+40
|\|
| * irmd: Remove shm_sanitizer threadDimitri Staessens2018-06-082-136/+40
| | | | | | | | | | | | | | | | | | | | This removes the sanitizer thread in the IRMd to avoid the IRMd eating the CPU when the buffer is full. The processes will clean the head PDU if there is a broken lock in the rdrbuff. Chances for a lingering tail PDU are slim. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>