| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This sets the CRC check to be disabled by default, since it greatly
hampers performance and is almost never needed.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
This initializes libgcrypt before use in the library. This fixes the
"called in non-operational state" error when CRC checking is enabled.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
Multiblock writes that require wrapping will now correctly pad
unuseable space at the end of the rdrbuff.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the seqno is further ahead than the lwe (this was checked
before), we can safely use seqno - lwe in unsigned arithmetic as the
distance in the sequence number space.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|/
|
|
|
|
|
|
| |
This adds a data qos cube that is reliable. Reliable qos can be
selected by setting the loss parameter of the qosspec to 0.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
This removes a #define that was not used anymore
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The __frct_rcv should return -EAGAIN if there is no packet for the
application, but 0 was always returned. Also fixes sequence number
rollover.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This moves the definition of the predefined qosspecs to qos.h and
qos.c. This allows applications to select them using qos_best_effort
etc.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This adds a QoS cube that allows sending packets directly over a raw
flow, without an FRCT state machine. Flow allocation with a NULL
qosspec will now default to such raw flows.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This revises the delta-t implementation to align with Watson's timer
specifications. FRCT will never deliver out-of-order packets. A raw
flow (without delta-t state machine) will be able to provide such a
service.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The rq was removed in a previous commit.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The element was not freed if insertion failed.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The reordering queue is replaced by a fixed ring buffer for speed and
simplicity.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The flow_fini() function was marking flows as wronly (so rdonly for
the application) when the flow was deallocated. With the recent
addition of the flowdown state, we can now mark them as down. Also
fixes some bounds checks and alignment.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The rdrb struct should be freed when destroying the rdrbuff, even when
the actual shared memory is not unlinked.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
This will change the FUSE mountpount to the name of the IPCP instead
of a generic name based on its pid.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
| |
The event type of the current event in the fqueue can now be requested
using the fqueue_type() command. Currently events for packets
(FLOW_PKT), flows (FLOW_UP, FLOW_DOWN) and allocation (FLOW_ALLOC,
FLOW_DEALLOC) are specified. The implementation only tracks FLOW_PKT
at this point.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This makes the buffer size used by the UNIX sockets configurable. In
case of a lot of IPCPs in the system it might become too small with
the default value, resulting in irm command failures. The user can now
easily configure it with an adequate value.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
If a program exits, it cleans its read buffer. However, another
process could still write a packet in that buffer, which would cause
the IPCP or IRMd to run into an assertion failure on shutdown. Setting
the rbuff to ACL_FLOWDOWN prevents this.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
This will unmount a stale FUSE mountpoint (an IPCP with the same pid
exited ungracefully on the system) before trying to create it.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
A previous commit tried to stat the shared memory file in case it was
already there, but stat does not seem to work for shared memory
files. This simply omits the O_EXCL attribute upon creation of the
shared memory file, since pids are unique anyway.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This unlinks previously allocated flow set shared memory. It could be
lingering in case an application with the same pid was SIGKILLED, and
didn't clean up its flow set shared memory.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This reads from the Ethernet device directly into the rdrbuff to avoid
a copy on the read side in the Ethernet IPCPs. This does not work for
the netmap device.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The list_ipcps call had a memleak in the failure case. Also fixes a
compiler warning for a possible uninitialized variable and renumbers
the gpb ipcpd message fields.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reg/unreg API is simplified to registering and unregistering a
single name with a single IPCP. The functionality associated with
registering names was moved from the IRMd to the irm tool. The
function to list IPCPs was simplified to return all IPCPs in the
system with their basic properties needed for management.
The above changes led to some needed changes in the irm tool and the
management functions that were depending on the previous behaviour of
list_ipcps.
Command line functionality to list IPCPs in the system is also added
to the irm tool.
Some older code was refactored.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows disabling partial reads. It adds a flag FLOWFRNOPART that
disables partial reads. Partial read is different from partial
delivery (FRCTFPARTIAL), which allows delivery of fragments of an
incomplete packet and thus potentially corrupted data. FLOWFRNOPART
will never deliver corrupted data (unless FRCTFPARTIAL is also set).
If FLOWFRNOPART is set and the buffer provided to flow_read is too
small for the SDU, that SDU will be discarded and -EMSGSIZE is
returned;
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
This simplifies some functions in the rdrbuff.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The UNIX sockets were using SOCK_STREAM, which does not preserve the
message boundaries. This switches to SOCK_SEQPACKET.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements partial read of packets if the buffer supplied to
flow_read() is smaller than the packet in the buffer. If the number of
bytes returned by flow_read equals the size of the buffer, the next
read() will deliver the next bytes of the packet (or 0 if the packet
was exactly the size of the buffer on the previous read).
Implements #7.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This completes the implementation of the SNDTIMEO for a blocking
write.
Fixes #6.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an IPC Process that uses DIX Ethernet with an Ethertype that
is configurable at bootstrap. This allows parallel DIX layers over the
same Ethernet network with different Ethertypes (and one LLC
layer). It allows jumbo frames in the future, and should avoid the
problems we have with some routers not handling LLC traffic very
well. The destination endpoint ID is sent as a 16 bit integer, so the
maximum payload is 1498 bytes in standard Ethernet, and 8998 bytes
when Jumbo frames are used.
The implementation is very similar to the Ethernet LLC IPCP, so it is
implemented using preprocessor macros in the single source instead of
duplicating code.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
| |
The rbuff uses the PTHREAD_COND_CLOCK for its condition variables, but
the flow_read was passing a time it got from the CLOCK_REALTIME_COARSE
clock. This causes the blocking reads not to timeout correctly.
The oping was updated to detect server timeouts and finish gracefully.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|