| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
The raw flows had no priority assigned, causing the scheduler to fail
on creation.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
In the current build an error would happen if a user simply runs make
check after running cmake, since the kademlia protocol buffer file was
not generated yet. This simply regenerates the file for the test.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
| |
The memset function was used without including <string.h>, which some
compilers complain about.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
| |
This sets updated default values for the default build. A higher
connect timeout until we have asynchronous local IPC. Disabled SWIG
since the lastest gcc reports an error. IPCP flow stats enabled by
default since their impact on the performance is very limited. Waiting
for the directory to enroll before returning to increase stability.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
| |
This adds the address to the DT directory name in the RIB.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The static analyzer misses the linked list logic. An assertion is
added that indicates that the pointer was changed indirectly by the
previous element.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The clang and gcc compilers don't complain about variable length
arrays using the -c89 flag unless the flag -Wvla or -Wpedantic is
set. This also fixes a memleak and two false positive uninitialized
variable warnings reported by the clang static analyzer in graph.c.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The flow allocator protocol used fd in the message exchange since eids
were directly mapped to fds. It's better to name them eid in the
protocol to avoid confusion.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This fixes a memleak for the info struct when join thread creation is
not needed. Fixes a false positive warning when running the clang
static analyzer. Removes a use-after-free warning that is not valid
since 0.11.4.
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 DHT test failed on the use of IPCP-specific calls. These calls are
now guarded by the correct defition checks.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The DHT called ipcp_sdb_release without including ipcp-dev, causing
compiler errors on some machines.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Loop-Free Alternates policy had bad memory management in two
places. In the calculation of the LFAs a table was freed in the first
iteration of a loop, whereas it was still needed in the other
iterations. It is now freed outside of the loop. In the alternate PFF
the address structs were not freed upon shutdown, this has been added
as well. It also fixes some bad initialization in the LFA calculation
function.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The query returned all addresses where a name was registered, causing
some scaling problems. Now it will return at most DHT_RETR_ADDR, which
is currently set at 1 (anycast).
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This adds the option to wait for the directory (DHT) to enroll on
creating a new data transfer connection. This makes scripting network
bootstraps more stable. The default setting is OFF.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
This recalculates the PFF upon adding a new neighbor, so that the
network reconverges faster. It is safe to do so since it is only done
by the two IPCPs that established the new flow. The PFF is also
recalculated every 4 seconds.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This will prevent quick calls to ipcp conn for dt flows to create
multiple join threads in parallel, instead the subsequent calls will
wait for the pending join to finish.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The DHT performed a lookup upon a new DT connection when it was
running for efficiency reasons. This lookup somehow cause SEGV under
stress (rapid bootstrapping of networks). This will be solved with a
full revision of the DHT implementation.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The list of commands was not cleaned up on shutdown.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The lookup struct uses the cookies to track pending request messages,
but they were not removed when a response is processed. Upon reuse of
a cookie for the next message, it could update the wrong lookup. This
removes the cookie for a lookup when it is looked for.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The DHT has a thread that continued to run during shutdown. The
shutdown state is now checked for. It will not try to send messages at
shutdown.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The connmgr requires the notifier, but the notifier was created after
and destroyed before the connmgr. This is now fixed.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This adds a function that locks a thread to a random core. This
greatly improves performance on multi-cpu systems. There is no
portable way to do this, this only implements it for GNU/Linux.
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>
|
|
|
|
|
|
|
|
|
|
|
| |
The read buffer had the exact length of a link-state message. With the
partial read implemented, we should then do another read() to check if
there are more parts of the message (which will return 0). To avoid
the additional read() call every time, the buffer was extended by 1
byte.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The number of bytes sent was not counting the data transfer PCI. This
is now fixed.
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 wrong rcv_bytes where it should have been snd_bytes.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
This fixes the access to an uninitialized dt_pci struct when updating
flow statistics in the case there is no next hop, which often resulted
in a segmentation fault.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The dht_get_state() function should be used to get the state of the
DHT. This fixes bug #4.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The sprintf was missing a format string. Some compilers did not
complain about this.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
There was a missing free in case the address was not found in the
routing table when trying to add an LFA for a certain address.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
Not all threads were cancelled on exit. This fixes (the rather
cryptic) error message "The futex facility returned an unexpected
error code" when running the stack with the address sanitizer. Also
fixes possible double frees when a pthread_create would fail.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The time of establishment will be printed as part of the flow
statistics (it is the same as the modification time of the file in the
FUSE filesystem). Some output was reordered and the length of the
sizes is updated to be sufficient for 64-bit values.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The flow statistics will now print the endpoint of the flow. If it's a
local endpoint for the IPCP, it will print the component
(e.g. "flow-allocator"). For remote flows, it will print the address
of the IPCP.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
| |
The flow statistics were not reset when a new connection was created,
resulting in wrong statistics.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
| |
The locks were not initialised correctly due to a misspelled define
and the fail_write was trying to lock a bad mutex (sometimes -1 out of
array). This also fixes the statistics gathered.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
| |
The import of the IPCP config protobuf message in the enrollment
message caused a double definition. The enroll.proto file is
deprecated and the definition of the enrollment message is moved to
the library to avoid this.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|