| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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 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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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 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 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>
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This adds the FLOWGRXQLEN and FLOWGTXQLEN operations to fccntl to get
the number of packets that are in the receive and transmit buffers
respectively. The flow statistics are updated to show these queue
lengths.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
There was a rdlock() instead of an unlock().
This fixes #3.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
Happy New Year, Ouroboros.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The ipcp will not have the rx_rb set for a pending flow, so it should
not call shm_rbuff_fini. The irmd should not call ipcp_flow_dealloc
for flows that are still pending flow allocation.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
OS X uses a different syntax for specifying ELF sections.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The library initializers with argc and argv arguments were specified
using the __attribute__((constructor)). This is undefined behaviour as
constructors should have no arguments. This is fixed by passing the
functions to the .init_array.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
Endianness conversion from/to the network for the sequence number was
missing in 68694bc.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the variable FRCT header with a packed struct, which
significantly simplifies the implementation. The shm_du_buff calls to
release the head/tail are updated to return a pointer to the original
head or the new tail (in symmetry to the alloc calls, which return a
pointer to the new head and old tail), so that it immediately points
to the structure that is needed.
The frct_pci sources are removed and frct is now fully in the frct.c
source file.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The frct_pci and rq headers are moved from include/ouroboros to
src/lib since they are only needed in the library. FRCT is moved to
its own source file.
FRCT takes the application PDUs, encapsulates and processes them and
hands them back. This makes it easier to disable FRCT should the
application want to write to a "raw" flow. An FRCT instance is now
allocated upon alloc and released upon dealloc.
The FRCT data structure is split into a sender and receiver connection
record. Setting a new configuration will now be done upon sending the
next data PDU, which will flag the DRF for a new run and use that
configuration. This avoids some issues should packets arrive
out-of-order, and simplifies setting a configuration.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The FLOWFNONBLOCK flag now has two subflags FLOWFRNOBLOCK and
FLOWFWNOBLOCK which allows setting the behavior of read and write
independently. The default behavior is unchanged (blocking read and
write).
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This revises the library init script so that it checks whether the
program is run by a python executable (python, python2 or python3) and
announces the script name instead of the python interpreter. This
enables binding python scripts.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
If the library init() fails, the fini() call tries to access
unreleased resources. The fix resets the ai struct to 0 if init()
fails and checks a heap pointer for NULL before the fini() accesses
internals.
Signed-off-by: dimitri staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|\
| |
| |
| |
| |
| | |
#626)
Be deprecate ouroboros init fini
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit deprecates ouroboros_init and ouroboros_fini and adds them
as a constructor or destructor, causing these function to be run
automatically when a program that links to the library calls and exits
main(). For this to fully work, the library had to be split so that we
can avoid the irmd calling these functions (the IRMd has to create the
shm structures on which these calls depend).
The library is split in 3 parts: libouroboros-dev, libouroboros-irm
and libouroboros-common. The latter is linked to the other two so that
including libouroboros-dev or libouroboros-irm will also link
libouroboros-common.
|
|/
|
|
|
|
| |
Multi-block support was forgotten during the update of the build
system. This enables it again and fixes some bugs when it is disabled
and larger SDUs are sent.
|
| |
|
|
|
|
|
|
|
|
| |
This adds the flow down event to Ouroboros. In the shim-eth-llc, a
netlink socket is opened which listens to device up/down events. For
each event the flow is then adjusted with fccntl to notify the user
the flow is down or back up again. In the normal IPCP an event is
thrown if a write reports that the flow is down.
|
|
|
|
|
| |
This adds a reordering queue to FRCT so that SDUs can be delivered
in-order when requested.
|
|
|
|
|
| |
This adds a per instance FRCT lock, since it was taking a write lock,
thereby severely impacting parallelism in dev.c
|
|
|
|
|
|
|
| |
This replaces the flow_set_* commands with a single fccntl command
that can configure flows and the FRCT instance.
For more details, see "man 3 fccntl".
|
| |
|
|\
| |
| |
| | |
Be deprecate gam
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The graph adjacency manager has been deprecated in favor of providing
an external interface into the connectivity manager so that
adjacencies can be controlled from the command line, user scripts or
user applications.
The gam and its associated policies were removed from the normal IPCP
and the IRM configuration tools. The "/members" part of the RIB was
deprecated. Removal of the gam means that initial connectivity based
on changes in the RIB can't be provided, so some changes were
required throughout the normal IPCP.
The enrollment procedure was revised to establish its own
connectivity. First, it gets boot information from a peer by
establishing a connection to the remote enrollment component and
downloading the IPCP configuratoin. This is now done using its own
protocol buffers message in anticipation of deprecation of the RIB and
CDAP for communication within a DIF.
After the boot information is downloaded, it establishes a data
transfer flow for enrolling the directory (DHT). After the DHT has
enrolled, it signals the peer to that enrollment is done, and the data
transfer connection is torn down.
Signaling connections is done via the nbs struct, which is now passed
to the connmgr, which enables control of the connectivity graph from
external sources.
|
|/
|
|
|
| |
This adds the configuration message to FRCT, which allows for
configuring the connection.
|
|
|
|
| |
A read lock was taken when a write lock was needed.
|
|
|
|
|
| |
This fixes several memleaks as reported by valgrind. It also fixes
some calls to close() with -1.
|
|
|
|
|
|
| |
This makes the sender and receiver inactivity timers into simple
checks that compare when the last SDU was sent to the current time to
set the receiver or sender inactivity.
|
|
|
|
|
| |
Timeout was asserted not to be NULL, but sometimes timeout can be NULL
and is a valid parameter when NULL.
|
|
|
|
|
| |
shm_flow_set_wait was called with a timeout even though
flow_event_wait was called with timeout NULL.
|
|
|
|
| |
frct_clear was called in ouroboros_fini instead of ouroboros_init.
|