]> git.proxmox.com Git - mirror_kronosnet.git/log
mirror_kronosnet.git
7 years agoUpdate TODO
Fabio M. Di Nitto [Wed, 25 Jan 2017 15:33:55 +0000 (16:33 +0100)]
Update TODO

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[send/recv] simplify _parse_recv_from_links internal API
Fabio M. Di Nitto [Wed, 25 Jan 2017 15:25:14 +0000 (16:25 +0100)]
[send/recv] simplify _parse_recv_from_links internal API

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transports] add support for transport_tx_sock_error
Fabio M. Di Nitto [Wed, 25 Jan 2017 13:51:47 +0000 (14:51 +0100)]
[transports] add support for transport_tx_sock_error

add IP_RECVERR for UDP to better handle errors on TX sockets

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[PMTUd] Fix global pmtud calculation
Fabio M. Di Nitto [Wed, 25 Jan 2017 07:07:10 +0000 (08:07 +0100)]
[PMTUd] Fix global pmtud calculation

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO list
Fabio M. Di Nitto [Tue, 24 Jan 2017 18:01:24 +0000 (19:01 +0100)]
Update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoMerge pull request #20 from jonesmz/travis-ci-for-pull-request
Fabio M. Di Nitto [Tue, 24 Jan 2017 17:30:02 +0000 (18:30 +0100)]
Merge pull request #20 from jonesmz/travis-ci-for-pull-request

Adds Travis CI continuous integration configuration file

7 years ago[transports] SCTP: handle short reads on sockets
Fabio M. Di Nitto [Tue, 24 Jan 2017 16:51:12 +0000 (17:51 +0100)]
[transports] SCTP: handle short reads on sockets

- fix trasport is_data API
- handle per accepted socket reassembly buffer by changing fd_tracker
  data for incoming connections
- allow in-kernel SCTP fragmentation again
- use MSG_EOR on a per socket base to reassemble partial packet delivery
- fix some whitespaces around

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoAdds Travis CI continuous integration configuration file
Michael Jones [Tue, 24 Jan 2017 16:46:18 +0000 (10:46 -0600)]
Adds Travis CI continuous integration configuration file

7 years agotransport: Rename 'link' to 'kn_link' so it doesn't conflict with libc
Christine Caulfield [Tue, 24 Jan 2017 09:32:57 +0000 (09:32 +0000)]
transport: Rename 'link' to 'kn_link' so it doesn't conflict with libc

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agopoc: add option to check CRCs in sctp_defrag_bug
Christine Caulfield [Mon, 23 Jan 2017 13:01:21 +0000 (13:01 +0000)]
poc: add option to check CRCs in sctp_defrag_bug

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years ago[PoC] implement EOR handling code for short reads
Fabio M. Di Nitto [Fri, 20 Jan 2017 13:50:54 +0000 (14:50 +0100)]
[PoC] implement EOR handling code for short reads

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[poc] add sctp potential fragmentation bug trigger
Fabio M. Di Nitto [Thu, 19 Jan 2017 18:58:25 +0000 (19:58 +0100)]
[poc] add sctp potential fragmentation bug trigger

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] drop last bits of common/
Fabio M. Di Nitto [Thu, 19 Jan 2017 08:32:56 +0000 (09:32 +0100)]
[build] drop last bits of common/

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transport] remove duplicate code
Fabio M. Di Nitto [Thu, 19 Jan 2017 08:32:07 +0000 (09:32 +0100)]
[transport] remove duplicate code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO
Fabio M. Di Nitto [Wed, 18 Jan 2017 12:48:23 +0000 (13:48 +0100)]
Update TODO

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transport] add knet_handle_get_transport_id_by_name api
Fabio M. Di Nitto [Wed, 18 Jan 2017 11:33:17 +0000 (12:33 +0100)]
[transport] add knet_handle_get_transport_id_by_name api

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transport] add knet_handle_get_transport_name_by_id api call
Fabio M. Di Nitto [Wed, 18 Jan 2017 09:31:05 +0000 (10:31 +0100)]
[transport] add knet_handle_get_transport_name_by_id api call

also fix a counter in knet_handle_get_transport_name_by_id

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transport] add knet_handle_get_transport_list api call
Fabio M. Di Nitto [Wed, 18 Jan 2017 08:55:59 +0000 (09:55 +0100)]
[transport] add knet_handle_get_transport_list api call

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[handle] fix error messages
Fabio M. Di Nitto [Wed, 18 Jan 2017 05:06:50 +0000 (06:06 +0100)]
[handle] fix error messages

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compat] Fix some includes for FreeBSD
Christine Caulfield [Tue, 17 Jan 2017 16:29:41 +0000 (16:29 +0000)]
[compat] Fix some includes for FreeBSD

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years ago[compat] minor cleanup on the autotool stuff
Fabio M. Di Nitto [Tue, 17 Jan 2017 16:15:42 +0000 (17:15 +0100)]
[compat] minor cleanup on the autotool stuff

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agogeneral: Add compatibility code & #ifdefs
Christine Caulfield [Tue, 17 Jan 2017 13:50:03 +0000 (13:50 +0000)]
general: Add compatibility code & #ifdefs

This is enough to get knet compiling on FreeBSD 11 and bits of it
working. It's nowhere near ready on BSD though, more work is needed,
but given the fast pace of development it's best to get this in now
rather than track it in a separate branch.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years agoUpdate TODO
Fabio M. Di Nitto [Tue, 17 Jan 2017 04:30:36 +0000 (05:30 +0100)]
Update TODO

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO
Fabio M. Di Nitto [Tue, 17 Jan 2017 04:28:56 +0000 (05:28 +0100)]
Update TODO

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[api] add commodity functions to convert to/from strings/sockaddress
Fabio M. Di Nitto [Mon, 16 Jan 2017 16:58:33 +0000 (17:58 +0100)]
[api] add commodity functions to convert to/from strings/sockaddress

functions are nothing more than wrappers for getnameinfo and getaddrinfo
with some sanity checks, but exposing them around saves lots of
maintanance of duplicate code across different stuff.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agohost: Remove host_tail as it's not used.
Christine Caulfield [Mon, 16 Jan 2017 14:50:17 +0000 (14:50 +0000)]
host: Remove host_tail as it's not used.

it also had a bug which could cause knet to crash after a host was
removed.

This patch puts new nodes at the front of the list rather than at the
end, but I don't think this is a problem.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years ago[test] fix comment
Fabio M. Di Nitto [Mon, 16 Jan 2017 08:53:16 +0000 (09:53 +0100)]
[test] fix comment

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[sctp] enable workaround for in-kernel fragmentation issue
Fabio M. Di Nitto [Mon, 16 Jan 2017 08:51:47 +0000 (09:51 +0100)]
[sctp] enable workaround for in-kernel fragmentation issue

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[test] kill obsoleted ping_test
Fabio M. Di Nitto [Mon, 16 Jan 2017 08:47:01 +0000 (09:47 +0100)]
[test] kill obsoleted ping_test

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO
Fabio M. Di Nitto [Mon, 16 Jan 2017 06:59:55 +0000 (07:59 +0100)]
Update TODO

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[sctp] port sctp to the new API and fix many issues
Fabio M. Di Nitto [Mon, 16 Jan 2017 06:44:30 +0000 (07:44 +0100)]
[sctp] port sctp to the new API and fix many issues

- use the new transport API
- fix locking context around to avoid race conditions and deadlocking
- fix shutdown code (segfaults and core dumps)
- properly differentiate between connecting sockets and accepted sockets
  and better use of fd_tracker
- abstract as much as possible socket management code from threads
- add lots of comments and debugging messages around
- simplify socket error management reported from RX thread
- rework loop timers for connect_thread to avoid thread overload
- reduce usage of _transport_addrtostr to one call and reuse
  link information around
- improve error handling across the board
- stop using data structs inside epolls and switch back to using fds
  this was necessary to avoid processing stale data from epolls
  and look up data from fd_tracket instead
- add listener stop function
- make functions safer to be called multiple times
- probably more.. but can't remember

NOTE: this is not the most elegant code, but it seems to be doing its job
fine.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[heartbeat] reset PMTUd on link down to trigger a new PMTUd when link come back online
Fabio M. Di Nitto [Mon, 16 Jan 2017 06:11:18 +0000 (07:11 +0100)]
[heartbeat] reset PMTUd on link down to trigger a new PMTUd when link come back online

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[PMTUd] fail early if transport is not connected
Fabio M. Di Nitto [Mon, 16 Jan 2017 05:21:11 +0000 (06:21 +0100)]
[PMTUd] fail early if transport is not connected

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[heartbeat] and make it a tiny little bit faster when transport is not connected
Fabio M. Di Nitto [Mon, 16 Jan 2017 04:01:14 +0000 (05:01 +0100)]
[heartbeat] and make it a tiny little bit faster when transport is not connected

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[heartbeat] make better use of transport_connected option
Fabio M. Di Nitto [Mon, 16 Jan 2017 03:58:56 +0000 (04:58 +0100)]
[heartbeat] make better use of transport_connected option

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[sockets] move socketpair code into transport common code
Fabio M. Di Nitto [Sun, 15 Jan 2017 06:09:01 +0000 (07:09 +0100)]
[sockets] move socketpair code into transport common code

also use _configure_common_socket for cloexec/nonblock and rx/tx buffers
that should be the same for all socketpairs, outgoing and incoming sockets

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dstthread] make sure not to get caught in signal when reading from socket
Fabio M. Di Nitto [Sun, 15 Jan 2017 06:05:52 +0000 (07:05 +0100)]
[dstthread] make sure not to get caught in signal when reading from socket

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[host] make sure not to get caught in signal when sending host updates
Fabio M. Di Nitto [Sun, 15 Jan 2017 06:05:08 +0000 (07:05 +0100)]
[host] make sure not to get caught in signal when sending host updates

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transports] drop fd_tracker locking in favour of global locking
Fabio M. Di Nitto [Thu, 12 Jan 2017 07:21:21 +0000 (08:21 +0100)]
[transports] drop fd_tracker locking in favour of global locking

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[udp] drop unnecessary list locking
Fabio M. Di Nitto [Thu, 12 Jan 2017 05:13:08 +0000 (06:13 +0100)]
[udp] drop unnecessary list locking

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[SCTP] temporary disable SCTP support while we fix the implementation
Fabio M. Di Nitto [Wed, 11 Jan 2017 14:54:26 +0000 (15:54 +0100)]
[SCTP] temporary disable SCTP support while we fix the implementation

not the best solution, but it's a quick one to allow master to build again

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[send/recv] report correct errno
Fabio M. Di Nitto [Wed, 11 Jan 2017 14:50:59 +0000 (15:50 +0100)]
[send/recv] report correct errno

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoRevert "[heartbeat] temporary disable usage of transport_connected"
Fabio M. Di Nitto [Wed, 11 Jan 2017 14:33:05 +0000 (15:33 +0100)]
Revert "[heartbeat] temporary disable usage of transport_connected"

This reverts commit 75ca10991fa3e0d9bc8cd9706395ff0e2bc62c38.

whops.. pushed in the wrong branch by mistake

7 years ago[heartbeat] temporary disable usage of transport_connected
Fabio M. Di Nitto [Wed, 11 Jan 2017 08:49:49 +0000 (09:49 +0100)]
[heartbeat] temporary disable usage of transport_connected

this will make it easier to stabilize SCTP and connection oriented
protocols

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO list
Fabio M. Di Nitto [Mon, 9 Jan 2017 08:59:16 +0000 (09:59 +0100)]
Update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transports] major rework of APIs and ABIs!
Fabio M. Di Nitto [Mon, 9 Jan 2017 08:18:41 +0000 (09:18 +0100)]
[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@redhat.com>
7 years ago[send/recv] remove stray unlock operation
Fabio M. Di Nitto [Wed, 21 Dec 2016 08:05:49 +0000 (09:05 +0100)]
[send/recv] remove stray unlock operation

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_SCTP_LINK_T to KNET_SUB_TRANSP_SCTP
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:48:33 +0000 (14:48 +0100)]
[logging] rename KNET_SUB_SCTP_LINK_T to KNET_SUB_TRANSP_SCTP

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_UDP_LINK_T to KNET_SUB_TRANSP_UDP
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:47:35 +0000 (14:47 +0100)]
[logging] rename KNET_SUB_UDP_LINK_T to KNET_SUB_TRANSP_UDP

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_LINK_T to KNET_SUB_RX
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:45:20 +0000 (14:45 +0100)]
[logging] rename KNET_SUB_LINK_T to KNET_SUB_RX

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_SEND_T to KNET_SUB_TX
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:44:09 +0000 (14:44 +0100)]
[logging] rename KNET_SUB_SEND_T to KNET_SUB_TX

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_PMTUD_T to KNET_SUB_PMTUD
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:42:28 +0000 (14:42 +0100)]
[logging] rename KNET_SUB_PMTUD_T to KNET_SUB_PMTUD

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_HB_T to KNET_SUB_HEARTBEAT
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:41:15 +0000 (14:41 +0100)]
[logging] rename KNET_SUB_HB_T to KNET_SUB_HEARTBEAT

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_TRANSPORT_T to KNET_SUB_TRANSPORT
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:39:32 +0000 (14:39 +0100)]
[logging] rename KNET_SUB_TRANSPORT_T to KNET_SUB_TRANSPORT

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] rename KNET_SUB_SWITCH_T to KNET_SUB_DSTCACHE
Fabio M. Di Nitto [Tue, 20 Dec 2016 13:37:57 +0000 (14:37 +0100)]
[logging] rename KNET_SUB_SWITCH_T to KNET_SUB_DSTCACHE

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] assign blocks to different logging subsystems
Fabio M. Di Nitto [Tue, 20 Dec 2016 09:57:18 +0000 (10:57 +0100)]
[logging] assign blocks to different logging subsystems

- drop KNET_SUB_PMTUD that was unused
- add KNET_SUB_TRANSPORT_T that was missing
- switch from "common" to "unknown" for odd logging
- fix up code around to allow holes in the structs
- fix up test suite

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[PMTUd] adjust all values around new transports
Fabio M. Di Nitto [Mon, 19 Dec 2016 09:28:22 +0000 (10:28 +0100)]
[PMTUd] adjust all values around new transports

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] cleanup conditionals to build SCTP and other protocols
Fabio M. Di Nitto [Mon, 19 Dec 2016 07:57:51 +0000 (08:57 +0100)]
[build] cleanup conditionals to build SCTP and other protocols

Unsupported protocols just need to return NULL on get_PROTO_transport
and contain all protocol conditionals within the transport_PROTO.c.

There is still one conditional in RX/TX thread that needs cleaning
but it's a rather complex operation and leave it in for now.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[transports] initialize transports with knet_handle and protects from missing proto ops
Fabio M. Di Nitto [Mon, 19 Dec 2016 07:41:46 +0000 (08:41 +0100)]
[transports] initialize transports with knet_handle and protects from missing proto ops

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[listener] drop unnecessary debugging code
Fabio M. Di Nitto [Mon, 19 Dec 2016 04:33:21 +0000 (05:33 +0100)]
[listener] drop unnecessary debugging code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[sctp] _handle_incoming_sctp don't leak accepted_socks on errors
Fabio M. Di Nitto [Sun, 18 Dec 2016 05:52:02 +0000 (06:52 +0100)]
[sctp] _handle_incoming_sctp don't leak accepted_socks on errors

add a check to verify max connections or we will leak FDs somewhere at some point

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[logging] threads should have _t naming
Fabio M. Di Nitto [Sun, 18 Dec 2016 05:49:12 +0000 (06:49 +0100)]
[logging] threads should have _t naming

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[sctp] don't pass notification packets to the decoder
Fabio M. Di Nitto [Sat, 17 Dec 2016 05:38:41 +0000 (06:38 +0100)]
[sctp] don't pass notification packets to the decoder

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] make SCTP build optional (default: on)
Fabio M. Di Nitto [Fri, 16 Dec 2016 19:29:14 +0000 (20:29 +0100)]
[build] make SCTP build optional (default: on)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agosctp: Fix a couple of crashes & tidy on_epoll usage
Christine Caulfield [Fri, 16 Dec 2016 14:12:44 +0000 (14:12 +0000)]
sctp: Fix a couple of crashes & tidy on_epoll usage

Also fix locking in sctp shutdown

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years ago[build] don't leak pam libraries all over the place
Fabio M. Di Nitto [Fri, 16 Dec 2016 07:23:44 +0000 (08:23 +0100)]
[build] don't leak pam libraries all over the place

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[links] fix segfault when using dynamic ip addresses
Fabio M. Di Nitto [Fri, 16 Dec 2016 05:23:24 +0000 (06:23 +0100)]
[links] fix segfault when using dynamic ip addresses

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO list
Fabio M. Di Nitto [Fri, 16 Dec 2016 04:57:18 +0000 (05:57 +0100)]
Update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] cleanup configure.ac and Makefile.am
Fabio M. Di Nitto [Fri, 16 Dec 2016 04:55:26 +0000 (05:55 +0100)]
[build] cleanup configure.ac and Makefile.am

- check for libqb only if building kronosnetd
- check for SCTP headers and fails if we don't find them
- export DEBUG conditional in Makefiles
- conditionally include netutils.c for DEBUG

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[rpm] fix BuildRequires for SCTP
Fabio M. Di Nitto [Fri, 16 Dec 2016 04:54:57 +0000 (05:54 +0100)]
[rpm] fix BuildRequires for SCTP

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[kronosnetd] Fix build after SCTP merge
Fabio M. Di Nitto [Fri, 16 Dec 2016 04:48:12 +0000 (05:48 +0100)]
[kronosnetd] Fix build after SCTP merge

Default to UDP for now, add support for multiple protocols later on

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[libknet] fix typo
Fabio M. Di Nitto [Fri, 16 Dec 2016 04:47:26 +0000 (05:47 +0100)]
[libknet] fix typo

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoUpdate TODO list
Fabio M. Di Nitto [Thu, 15 Dec 2016 14:44:58 +0000 (15:44 +0100)]
Update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoMerge pull request #18 from chrissie-c/topic-cc-transports
Fabio M. Di Nitto [Thu, 15 Dec 2016 14:24:29 +0000 (15:24 +0100)]
Merge pull request #18 from chrissie-c/topic-cc-transports

Factor out protocol code and add new ones

7 years agointernals: Finish renaming QB_LISt macros to KNET_LIST
Christine Caulfield [Tue, 13 Dec 2016 16:07:12 +0000 (16:07 +0000)]
internals: Finish renaming QB_LISt macros to KNET_LIST

7 years agolibknet: Fix things raised in review
Christine Caulfield [Tue, 13 Dec 2016 15:55:21 +0000 (15:55 +0000)]
libknet: Fix things raised in review

7 years agolibknet:\1aadd TCP transport
Christine Caulfield [Fri, 2 Dec 2016 15:59:08 +0000 (15:59 +0000)]
libknet:\1aadd TCP transport

7 years agolibknet: add SCTP transport
Christine Caulfield [Fri, 2 Dec 2016 15:27:03 +0000 (15:27 +0000)]
libknet: add SCTP transport

7 years agolibknet: Add support for multiple transports
Christine Caulfield [Fri, 2 Dec 2016 15:10:08 +0000 (15:10 +0000)]
libknet: Add support for multiple transports

Changes the API to add transport to
knet_link_set_config & knet_link_get_config

7 years agolibknet: Factor out UDP into its own file
Christine Caulfield [Fri, 2 Dec 2016 14:52:40 +0000 (14:52 +0000)]
libknet: Factor out UDP into its own file

With a transport_common file for protocol-independant things.

7 years ago[poc] remove iov-enc code now merged in master
Fabio M. Di Nitto [Fri, 25 Nov 2016 13:35:49 +0000 (14:35 +0100)]
[poc] remove iov-enc code now merged in master

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] Add knet_bench as more flexible replacement for ping_test
Fabio M. Di Nitto [Fri, 25 Nov 2016 13:26:24 +0000 (14:26 +0100)]
[tests] Add knet_bench as more flexible replacement for ping_test

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[send/recv] Fix bug in handling HOSTINFO packets seq num
Fabio M. Di Nitto [Fri, 25 Nov 2016 13:05:04 +0000 (14:05 +0100)]
[send/recv] Fix bug in handling HOSTINFO packets seq num

the bcast/ucast seq num were being mixed up, causing packet
loss on link up/down (also in active mode).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add facility to stop a whole knet handle in one shot
Fabio M. Di Nitto [Mon, 21 Nov 2016 07:59:48 +0000 (08:59 +0100)]
[tests] add facility to stop a whole knet handle in one shot

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] allow scheduler to be configured and allow start_logging to be called multipl...
Fabio M. Di Nitto [Mon, 21 Nov 2016 07:41:21 +0000 (08:41 +0100)]
[tests] allow scheduler to be configured and allow start_logging to be called multiple times safely

also test crypto_bench with multiple schedulers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] use SCHED_RR for crypto_bench
Fabio M. Di Nitto [Sat, 19 Nov 2016 05:32:27 +0000 (06:32 +0100)]
[tests] use SCHED_RR for crypto_bench

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add options to configure scheduler
Fabio M. Di Nitto [Wed, 16 Nov 2016 09:46:02 +0000 (10:46 +0100)]
[tests] add options to configure scheduler

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] move crypto bench to use start_logging
Fabio M. Di Nitto [Wed, 16 Nov 2016 07:48:52 +0000 (08:48 +0100)]
[tests] move crypto bench to use start_logging

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add knet logs: prefix when no logs are being recorded
Fabio M. Di Nitto [Wed, 16 Nov 2016 07:48:15 +0000 (08:48 +0100)]
[tests] add knet logs: prefix when no logs are being recorded

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add warning on when to use or not to use start_logging
Fabio M. Di Nitto [Wed, 16 Nov 2016 07:47:56 +0000 (08:47 +0100)]
[tests] add warning on when to use or not to use start_logging

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] Fix Makefile.am to build check_PROGRAMS
Fabio M. Di Nitto [Wed, 16 Nov 2016 07:30:25 +0000 (08:30 +0100)]
[tests] Fix Makefile.am to build check_PROGRAMS

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add logging thread support to simplify writing tests
Fabio M. Di Nitto [Wed, 16 Nov 2016 07:28:50 +0000 (08:28 +0100)]
[tests] add logging thread support to simplify writing tests

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years agoMerge pull request #16 from miz-take/prototype
Fabio M. Di Nitto [Tue, 15 Nov 2016 16:56:01 +0000 (17:56 +0100)]
Merge pull request #16 from miz-take/prototype

saved errno when epoll_ctl failed

7 years agosaved errno when epoll_ctl failed
Takeshi MIZUTA [Tue, 15 Nov 2016 16:52:35 +0000 (01:52 +0900)]
saved errno when epoll_ctl failed

7 years agoUpdate TODO list
Fabio M. Di Nitto [Tue, 15 Nov 2016 05:25:59 +0000 (06:25 +0100)]
Update TODO list

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] rename fun_crypto_benchmark to crypto_bench
Fabio M. Di Nitto [Tue, 15 Nov 2016 05:19:12 +0000 (06:19 +0100)]
[tests] rename fun_crypto_benchmark to crypto_bench

and create a benchmark section in tests/Makefile.am

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] fix up input handling on crypto tests
Fabio M. Di Nitto [Sun, 13 Nov 2016 12:09:11 +0000 (13:09 +0100)]
[tests] fix up input handling on crypto tests

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] drop the unnecessary hash_block code
Fabio M. Di Nitto [Sun, 13 Nov 2016 10:22:47 +0000 (11:22 +0100)]
[crypto] drop the unnecessary hash_block code

this was a leftover from corosync port of the code and it was
a failsafe for buffer allocation apparently. buffer allocation
was completely reworked in corosync to dynamically account for
headers and so on.

this also removes one memcpy and shave some more time in hashing
operations.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] dynamically allocate memory for int_crypto_test
Fabio M. Di Nitto [Sun, 13 Nov 2016 10:21:22 +0000 (11:21 +0100)]
[tests] dynamically allocate memory for int_crypto_test

and make it easier to extend text to some input boundaries.

also make check-memcheck doesn't appear to spot bad memory access
on allocated-on-stack buffers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[test] move benchmark outside of regular testing
Fabio M. Di Nitto [Sun, 13 Nov 2016 10:20:46 +0000 (11:20 +0100)]
[test] move benchmark outside of regular testing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>