Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: ad48ef94b64a9e45ede4396e7bd5ccf7adf2bbf5
https://github.com/fabbione/kronosnet/commit/ad48ef94b64a9e45ede4396e7bd5cc…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2017-01-09 (Mon, 09 Jan 2017)
Changed paths:
M kronosnetd/vty_cli_cmds.c
M libknet/Makefile.am
M libknet/handle.c
M libknet/host.c
M libknet/internals.h
M libknet/libknet.h
M libknet/link.c
R libknet/listener.c
R libknet/listener.h
M libknet/tests/api-check.mk
M libknet/tests/api_knet_host_remove.c
A libknet/tests/api_knet_link_clear_config.c
M libknet/tests/api_knet_link_get_config.c
M libknet/tests/api_knet_link_get_enable.c
M libknet/tests/api_knet_link_get_link_list.c
M libknet/tests/api_knet_link_get_ping_timers.c
M libknet/tests/api_knet_link_get_pong_count.c
M libknet/tests/api_knet_link_get_priority.c
M libknet/tests/api_knet_link_get_status.c
M libknet/tests/api_knet_link_set_config.c
M libknet/tests/api_knet_link_set_enable.c
M libknet/tests/api_knet_link_set_ping_timers.c
M libknet/tests/api_knet_link_set_pong_count.c
M libknet/tests/api_knet_link_set_priority.c
M libknet/tests/api_knet_send.c
M libknet/tests/api_knet_send_sync.c
M libknet/tests/knet_bench.c
M libknet/tests/test-common.c
M libknet/threads_heartbeat.c
M libknet/threads_send_recv.c
M libknet/transport_common.c
M libknet/transport_udp.c
M libknet/transports.h
Log Message:
-----------
[transports] major rework of APIs and ABIs!
This commit breaks APIs and ABIs and this changelog might be missing
a bit or 5.
External visible changes:
- Change link initialization process API:
The old method:
- link_set_config -> link_enable
where link_set_config would simply store config data (sockaddr and
such) in the link struct and link_enable would create sockets and
do the magic. This method didn't work well for complex transports
such as SCTP and introduced a series of race conditions and deadlocks.
The new method:
- link_set_config would now store config in link struct AND create
all related sockets and such. The link will not be used for data
traffic till enabled.
- link_set_enable will enable/disable the link for traffic (including
heartbeat) and requires a link to be configured (as before)
- link_clear_config (new API) can/has to be called after disabling
a link to close all connections and sockets (free resources).
Internal changes:
- Drop the concept of listeners.* and delegate those to
underlying transports.
- Add the concept of fd_tracker. Each transport is required and it is
responsible to update the fd_tracking array for the fd that the
transport itself is creating/using/clearing.
The fd_tracker is required to perform fast lookups on socket
errors and RX thread to determine what code is responsible to parse
given conditions such as errors from the sockets or OOB data/notifications.
- Introduce the concept of link->transport_connected.
In case the transport requires socket connection to the other end (SCTP for
example), set to 0 while disconnected and set 1 once connected to the other
side. This flag will avoid unnecessary errors generated from the TX threads.
NOTE: still needs better plumbing around. For now it's only partially used
in the heartbeat thread. UDP sets to 1 by default.
- Rework the transport API to be easier to use.
- If a transport is not available, get_XXXX_transport() should return NULL.
- A transport that provides &XXXX_transport_ops MUST have all operations
implemented as described in internals.h. This is required to skip tons
of if/else checks on fast code paths.
- Improve documentation of the transport API in internals.h.
- transport common: drop some unnecessary functions for now, they might
can back later in better format once SCTP is working again.
- provide a locked/unlocked version of _set_fd_tracker but this is an
artifact of trying to fix SCTP deadlocking. _set_fd_tracker should
always be locked.
- cleanup transport_udp.c to match the new API and perform better
error handling and better cleaning in case of errors.
- switch mtu_overhead to constant from call into a function.
- drop usage of _transport_addrtostr/_transport_addrtostr_free for all but
accepting incoming SCTP connections. All other datas are already available
and it's unnecessary to perform extra lookups. This will eventually
move to a proper knet_api and avoid completely the need to build with --debug.
- RX thread:
- use the new transport hooks to handle socket errors and
determine if a packet is data or internal OOB info.
- remove the last transport specific bits and move them into
transport implementation itself.
- Test suite:
- Update the test suite to deal with the new API changes
- Fix a couple of shutdown problems in knet_bench
- Fix a shutdown issue in test-common.c
- Document the whole recvmmsg API in details, based on kernel
implementation. recvmmsg man page is incorrect.
- Fix kronosnetd to use the new APIs
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 815929bfa458daec8d95e001c517268db03ea337
https://github.com/fabbione/kronosnet/commit/815929bfa458daec8d95e001c51726…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/transport_sctp.c
Log Message:
-----------
[logging] rename KNET_SUB_SCTP_LINK_T to KNET_SUB_TRANSP_SCTP
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 322c5efe3d5068cd556e1d2568a124e246c5ba02
https://github.com/fabbione/kronosnet/commit/322c5efe3d5068cd556e1d2568a124…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/transport_udp.c
Log Message:
-----------
[logging] rename KNET_SUB_UDP_LINK_T to KNET_SUB_TRANSP_UDP
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 42b8f262e2e07f4d860ee8be7187554f1467f7b0
https://github.com/fabbione/kronosnet/commit/42b8f262e2e07f4d860ee8be718755…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/threads_send_recv.c
M libknet/transport_common.c
Log Message:
-----------
[logging] rename KNET_SUB_LINK_T to KNET_SUB_RX
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 258ce15806ecdef6107694d11274f5a887d69bea
https://github.com/fabbione/kronosnet/commit/258ce15806ecdef6107694d11274f5…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/threads_send_recv.c
Log Message:
-----------
[logging] rename KNET_SUB_SEND_T to KNET_SUB_TX
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: ddb593a86c86c615d70a068864cf5f0f8102e2bd
https://github.com/fabbione/kronosnet/commit/ddb593a86c86c615d70a068864cf5f…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/threads_pmtud.c
Log Message:
-----------
[logging] rename KNET_SUB_PMTUD_T to KNET_SUB_PMTUD
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 555241c412cee2f726c7fb8689c9a5770020f78e
https://github.com/fabbione/kronosnet/commit/555241c412cee2f726c7fb8689c9a5…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/threads_heartbeat.c
Log Message:
-----------
[logging] rename KNET_SUB_HB_T to KNET_SUB_HEARTBEAT
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 1a84db2b75a7f04408c6795d2906e5ce6974efe8
https://github.com/fabbione/kronosnet/commit/1a84db2b75a7f04408c6795d2906e5…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/transport_common.c
M libknet/transport_sctp.c
Log Message:
-----------
[logging] rename KNET_SUB_TRANSPORT_T to KNET_SUB_TRANSPORT
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: dbaeb80ac734a33b3409fe1bc5d2a097c74bb928
https://github.com/fabbione/kronosnet/commit/dbaeb80ac734a33b3409fe1bc5d2a0…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2016-12-20 (Tue, 20 Dec 2016)
Changed paths:
M libknet/libknet.h
M libknet/logging.c
M libknet/threads_dsthandler.c
Log Message:
-----------
[logging] rename KNET_SUB_SWITCH_T to KNET_SUB_DSTCACHE
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>