| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The -EAGAIN from a failed non-blocking flow read would trigger the
assertion. This snuck in somehow (we need some unit tests for dev.c).
|
| |
|
|
|
|
|
| |
Copyright is set to 2016 - 2017. License text on includes and sources
in the library are changed to indicate the LGPLv2.1 license.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
An errno EIRMD has been added to errno.h to indicate failure to send a
message tot the IRMd. The IRM tool will report such errors, which
makes it easier for users to detect that the IRM was not started or
has failed.
|
|
|
|
|
| |
If a thread with a pending flow terminates, ap_fini would wait for the
condvar to destroy the flow indefinitely.
|
|
|
|
|
| |
The QoS cubes were not initialized in dev.c, which sometimes caused
segfaults in the fmgr when calling ipcp_flow_get_qoscube.
|
|
|
|
|
| |
This corrects the license statements on all files. Installed headers
are LGPLv2.1, the rest of the code is GPLv2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Now that we have an rbuff per flow per AP, there is no more need to
keep the dst_api in the rdrbuff. This also simplifies the sanitizer in
the irmd.
|
|
|
|
|
|
|
| |
All calls for opening rbuffs are now concentrated on the dev side.
This allows some simplifications in the np1 calls. The ipcp_fini call
will not destroy the mutex associated with the state, since the final
state needs to be checked before shutting down an IPCP.
|
|
|
|
|
|
| |
Flow_event_wait will either return -EINVAL, -ETIMEDOUT or a positive
integer indicating the number of SDUs in the fqueue. This allows to
call the function as the condition for a non-terminating while loop.
|
|
|
|
| |
Fixes a little bug that sneaked in with the revised deallocation.
|
|
|
|
|
|
|
|
|
| |
If alloc_res fails all resources will be cleaned, except for the
assigned flow_descriptor, which must be released with a dealloc call.
Calling dealloc after a failed flow_alloc will not try to destroy the
already cleaned up flow in the IRMd and IPCPs.
Also fixes some memleaks in the oping client.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
ipcpd: Add threadpool for main loop
|
| |
| |
| |
| |
| |
| |
| | |
This adds a threadpool for the main loop of the IPCPs. Before there
was a single thread handling each request, which could result in
starvation since performing name queries at the same time as enrolling
a normal IPCP was impossible.
|
|/ |
|
|
|
|
|
|
|
| |
Deallocation was reverted to a synchronoous operation between the AP,
IRMd and IPCP in order to avoid inconsistent states of the port_id.
Fixes some memory leaks, particularly the shm_flow_set is now closed
upon deallocation.
|
|
|
|
|
| |
The default flow options were not set when a flow allocation request
arrives remotely. This went unnoticed due to a previous bug.
|
|
|
|
| |
The rdrbuff was previously closed before the remaining SDUs were removed.
|
|
|
|
|
| |
An untested (and wrong) modification to the fqueue was mistakenly
added to a previous commit. This corrects the bad code.
|
|
|
|
| |
FLOW_O_RDONLY is 0, so the previous statement would always be false.
|
|
|
|
|
| |
This has the code checked with -Wcast-qual and -Wconversion flags.
These flags were removed because SWIG generated code fails.
|
|
|
|
|
| |
This reduces the risk for some bugs, for instance due to
signed/unsigned mismatches and unused variables.
|
|
|
|
|
| |
This stabilises flow allocation now that the rbuffs are created upon
flow allocation. Only the IRMd can sync this process sufficiently.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Added the missing implementation of setting read/write options for
flows. This allows applications to block the fast path for
remotes. IPCPs can use this to block the fast path for the N + 1 flow
when receiving remote deallocation requests.
|
| |
|
|
|
|
| |
The safe copy was not correctly initialised.
|
|
|
|
|
| |
Both the N and N-1 entity must now call flow_dealloc for the port_id
to be released.
|
|
|
|
|
|
| |
This will allow to finalize deallocating flows until all SDUs have
been processed. Read and write calls will now block when a flow was
deallocated. Replaces NULL checks in the fast path with asserts.
|
| |
|
|
|
|
|
| |
Flow deallocation from the application will immediately return (void
call). The IRMd will not send a reply message.
|
|
|
|
|
| |
The SDU's were not correctly removed upon shutdown, peek should be
pop.
|
|
|
|
|
|
| |
Some locks were taken at an inappropriate time, causing the
shim-eth-llc to block indefinitely upon shutdown and causing flow
allocation to halt since a response could never be given.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
The flow_set now has a safe copy which is threadsafe for the select
call without needing a lock. This greatly speeds up consecutive
select calls.
|
|
|
|
|
|
|
| |
The flow_select call now takes as a parameter a flow_set_t, which
specifies a set of flow descriptors that will unblock the select call
when an SDU for one of them arrives. The select call has been moved to
its own header.
|
| |
|
|
|
|
|
| |
Renamed _ap_instance to ai, adds a char * daf_name (to be set by ipcps
in ipcp-dev.h, later to be set when we generalise enrolment to DAFs).
|
|
|
|
| |
Fast path is split in north and southbound paths.
|
|
|
|
|
|
|
|
|
|
| |
The shm_du_map is renamed to shm_rdrbuff to reflect the Random
Deletion Ringbuffer used in the implementation. The close_on_exit call
is removed and SDUs are cleaned up by the application in the ap_fini()
call. This required a non-blocking peek() operation in the shm_ap_rbuff.
Some initial implementation for future support of qos cubes has been
added to the shm_rdrbuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The complete data model inside the IRMd has been restructured. The
bind operation was revised to allow binding of AP and AP instances and
register those names with different DIFs (see "irm bind" for details).
Server applications require to call ap_init with a server name
argument, client application that do not the be reachable over any DIF
can call ap_init(NULL). Calling ap_init for a client with a specified
name will not have adverse consequences for the application, but will
consume unnecessary resources in the IRMd.
Application servers can now be started at any point after the IRMd has
been started. Starting servers, binding AP names and registering names in
DIFs can be performed in any order that does not defy temporal logic.
Supports naming instances by their pid. In case of IPCP Instances
created with the IRM tool, the name assigned during "irm ipcp create"
can be used.
All the changes required updates in the tools.
|
|\
| |
| |
| | |
lib, irmd: Bind AP instances to AP_subsets
|
| |
| |
| |
| |
| |
| |
| | |
This call will allow grouping AP instances of a certain AP together
which are configured identically. Adds the bind operation to dev and
updates the applications to make use of this call. Flow_alloc is now
only called with the pid and doesn't send the apn anymore.
|
|/
|
|
|
|
| |
This will add a timeout to the socket so that a process won't be
blocked by the actions of the process with which it is communicating
over the socket.
|
| |
|
|
|
|
|
| |
Fix missing set of api upon flow_alloc.
Various locking fixes.
|