]> git.proxmox.com Git - mirror_kronosnet.git/log
mirror_kronosnet.git
6 years agobuild: check for the --enable-new-dtags flag before using it
Ferenc Wágner [Sun, 28 Jan 2018 21:50:53 +0000 (22:50 +0100)]
build: check for the --enable-new-dtags flag before using it

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: sanitize CFLAGS handling
Ferenc Wágner [Tue, 23 Jan 2018 11:01:37 +0000 (12:01 +0100)]
build: sanitize CFLAGS handling

As for LDFLAGS previously: leave the CFLAGS "user variable" untouched to
enable easy selective overriding of the flags used by the build system.

Using $lt_prog_compiler_pic shouldn't be necessary, let's drop it and
see if anything breaks. WERROR_CFLAGS was undefined, so dropped as well.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: we preserve CPPFLAGS, just remove the tempting hooks
Ferenc Wágner [Tue, 23 Jan 2018 10:44:38 +0000 (11:44 +0100)]
build: we preserve CPPFLAGS, just remove the tempting hooks

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: sanitize LDFLAGS handling
Ferenc Wágner [Sat, 27 Jan 2018 22:22:45 +0000 (23:22 +0100)]
build: sanitize LDFLAGS handling

The Automake manual states that according to the GNU Coding Standards
the so-called "Variables reserved for the user" mustn't be changed by
the build system, and they must override the default settings from the
build system.  The "Flag Variables Ordering" section provides the
recipes on which we build here.

Using $lt_prog_compiler_pic directly shouldn't be necessary, let's try
leaving it out.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: LIBS belong to LDADD for binaries
Ferenc Wágner [Sat, 27 Jan 2018 22:21:18 +0000 (23:21 +0100)]
build: LIBS belong to LDADD for binaries

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: remove unused DEBUG Automake conditional
Ferenc Wágner [Tue, 23 Jan 2018 16:36:27 +0000 (17:36 +0100)]
build: remove unused DEBUG Automake conditional

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #110 from kronosnet/error_propagation
Fabio M. Di Nitto [Tue, 30 Jan 2018 04:50:12 +0000 (05:50 +0100)]
Merge pull request #110 from kronosnet/error_propagation

Add some missing error propagation

6 years agoPropagate NSS initialization errors
Ferenc Wágner [Sun, 21 Jan 2018 22:56:58 +0000 (23:56 +0100)]
Propagate NSS initialization errors

6 years agoEVP_CIPHER_block_size returns size_t, which is unsigned
Ferenc Wágner [Sun, 21 Jan 2018 22:26:50 +0000 (23:26 +0100)]
EVP_CIPHER_block_size returns size_t, which is unsigned

6 years agoPropagate OpenSSL initialization errors
Ferenc Wágner [Wed, 10 Jan 2018 21:07:28 +0000 (22:07 +0100)]
Propagate OpenSSL initialization errors

6 years agoAdd some missing error propagation
Ferenc Wágner [Wed, 3 Jan 2018 14:12:11 +0000 (15:12 +0100)]
Add some missing error propagation

6 years agoMerge pull request #119 from kronosnet/inhouse-manpage-generation
Fabio M. Di Nitto [Mon, 29 Jan 2018 10:06:40 +0000 (11:06 +0100)]
Merge pull request #119 from kronosnet/inhouse-manpage-generation

Inhouse manpage generation

6 years ago[man] do not ship precompiled doxyxml
Fabio M. Di Nitto [Sun, 28 Jan 2018 04:53:16 +0000 (05:53 +0100)]
[man] do not ship precompiled doxyxml

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] add build requires on doxygen
Fabio M. Di Nitto [Fri, 26 Jan 2018 11:00:21 +0000 (12:00 +0100)]
[man] add build requires on doxygen

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] fix man page generation external deps on doxyxml
Fabio M. Di Nitto [Fri, 26 Jan 2018 04:28:11 +0000 (05:28 +0100)]
[man] fix man page generation external deps on doxyxml

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] fix distcheck, build out of tree and tarball generation
Fabio M. Di Nitto [Thu, 25 Jan 2018 21:08:41 +0000 (22:08 +0100)]
[man] fix distcheck, build out of tree and tarball generation

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] update .gitignore
Fabio M. Di Nitto [Thu, 25 Jan 2018 17:45:29 +0000 (18:45 +0100)]
[man] update .gitignore

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] switch to autogenerated man pages
Fabio M. Di Nitto [Thu, 25 Jan 2018 17:44:51 +0000 (18:44 +0100)]
[man] switch to autogenerated man pages

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agodoxyxml: Fix parameter ordering
Christine Caulfield [Thu, 25 Jan 2018 12:56:54 +0000 (12:56 +0000)]
doxyxml: Fix parameter ordering

Also tidy pointer printing and remove extraneous quotes from
the BITS IN CAPS (not sure why I did that, but it helps the diff
from the old pages)

6 years ago[man] don't output unnecessary .PP sections
Fabio M. Di Nitto [Wed, 24 Jan 2018 16:07:20 +0000 (17:07 +0100)]
[man] don't output unnecessary .PP sections

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] fix comma separated list in See Also section
Fabio M. Di Nitto [Wed, 24 Jan 2018 05:14:39 +0000 (06:14 +0100)]
[man] fix comma separated list in See Also section

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] reduce diff with the old man pages
Fabio M. Di Nitto [Wed, 24 Jan 2018 05:01:10 +0000 (06:01 +0100)]
[man] reduce diff with the old man pages

O...C...D...

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] first attempt to plug doxyxml to replace doxy2man
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:48:31 +0000 (18:48 +0100)]
[man] first attempt to plug doxyxml to replace doxy2man

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] fix args parsing and help text
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:47:32 +0000 (18:47 +0100)]
[man] fix args parsing and help text

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoUpdate .gitignore
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:47:11 +0000 (18:47 +0100)]
Update .gitignore

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] init variable and silence gcc
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:24:27 +0000 (18:24 +0100)]
[man] init variable and silence gcc

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] fix casting around
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:22:59 +0000 (18:22 +0100)]
[man] fix casting around

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] define _DEFAULT_SOURCE for new features.h
Fabio M. Di Nitto [Tue, 23 Jan 2018 17:17:39 +0000 (18:17 +0100)]
[man] define _DEFAULT_SOURCE for new features.h

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] add libqb and libxml2 devel as general buildrequires for man pages
Fabio M. Di Nitto [Tue, 23 Jan 2018 16:35:44 +0000 (17:35 +0100)]
[man] add libqb and libxml2 devel as general buildrequires for man pages

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agodoxyxml: Fix compiler warnings
Christine Caulfield [Tue, 23 Jan 2018 09:16:27 +0000 (09:16 +0000)]
doxyxml: Fix compiler warnings

6 years ago[man] add makefile.am
Fabio M. Di Nitto [Tue, 23 Jan 2018 06:10:27 +0000 (07:10 +0100)]
[man] add makefile.am

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] move doxyman to build-aux
Fabio M. Di Nitto [Tue, 23 Jan 2018 06:09:50 +0000 (07:09 +0100)]
[man] move doxyman to build-aux

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[man] drop redundant update-man-page code
Fabio M. Di Nitto [Thu, 7 Dec 2017 04:51:19 +0000 (05:51 +0100)]
[man] drop redundant update-man-page code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agomanpages: Generate man pages using our own command
Christine Caulfield [Mon, 22 Jan 2018 14:11:07 +0000 (14:11 +0000)]
manpages: Generate man pages using our own command

This removes the dependncy on doxy2man which is not
packaged.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
6 years agoMerge pull request #118 from kronosnet/runpath
Fabio M. Di Nitto [Fri, 19 Jan 2018 13:21:19 +0000 (14:21 +0100)]
Merge pull request #118 from kronosnet/runpath

Use LD_LIBRARY_PATH to find the build tree artifacts

6 years agoUse LD_LIBRARY_PATH to find the build tree artifacts and disable RPATH across the...
Fabio M. Di Nitto [Fri, 19 Jan 2018 12:42:30 +0000 (13:42 +0100)]
Use LD_LIBRARY_PATH to find the build tree artifacts and disable RPATH across the project

The libtool wrapper scripts of the test binaries set LD_LIBRARY_PATH to
find the libknet library and its modules in the build tree, but RPATH
overrides this setting.  This is why RPATH is deprecated, so we switch
to RUNPATH instead by using --enable-new-dtags, which is already the
linker default on Debian for example.

Based on the original patch from Ferenc.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #117 from kronosnet/ppc64
Fabio M. Di Nitto [Thu, 18 Jan 2018 12:36:19 +0000 (13:36 +0100)]
Merge pull request #117 from kronosnet/ppc64

tests: check for exported symbols in the data section as well

6 years agotests: check for exported symbols in the data section as well
Ferenc Wágner [Thu, 18 Jan 2018 10:46:30 +0000 (11:46 +0100)]
tests: check for exported symbols in the data section as well

The PowerPC64 ELFv1 ABI puts the function descriptor symbols there,
but why restrict the consistency check to the text section anyway?

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #115 from liu4480/typo-fix
Fabio M. Di Nitto [Wed, 17 Jan 2018 09:57:59 +0000 (10:57 +0100)]
Merge pull request #115 from liu4480/typo-fix

typo fix: change the url in spec file

6 years agotypo fix: change the url in spec file
Bin Liu [Wed, 17 Jan 2018 07:49:38 +0000 (15:49 +0800)]
typo fix: change the url in spec file

6 years agoMerge pull request #112 from kronosnet/man-pages v1.0
Fabio M. Di Nitto [Mon, 8 Jan 2018 15:26:05 +0000 (16:26 +0100)]
Merge pull request #112 from kronosnet/man-pages

[docs] Update copyright and man pages pre-1.0

6 years ago[docs] Update copyright and man pages pre-1.0
Fabio M. Di Nitto [Mon, 8 Jan 2018 14:36:47 +0000 (15:36 +0100)]
[docs] Update copyright and man pages pre-1.0

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #111 from kronosnet/fixes
Fabio M. Di Nitto [Mon, 8 Jan 2018 13:55:38 +0000 (14:55 +0100)]
Merge pull request #111 from kronosnet/fixes

Fixes

6 years ago[PMTUd] drop (now) unnecessary and dangerous usleep
Fabio M. Di Nitto [Mon, 8 Jan 2018 11:12:19 +0000 (12:12 +0100)]
[PMTUd] drop (now) unnecessary and dangerous usleep

prior to all threads being able to notify PMTUd of EMSGSIZE errors,
we had this random usleep in there to have time to collect data.
It was working at the time, but it's a bad idea.

On super large clusters (>66 nodes) with 4 links on each node, when
applying heavy load (cpghum on all nodes at once), the average latency
between nodes can increase so much that the PMTUd thread usleep
could literally block corosync for seconds at a time.

Drop the usleep and live happily ever after

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] reset value or suffer the pains of DEADLOCKING! errno is per thread, not...
Fabio M. Di Nitto [Mon, 8 Jan 2018 11:11:32 +0000 (12:11 +0100)]
[PMTUd] reset value or suffer the pains of DEADLOCKING! errno is per thread, not per function

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] only notify PMTUd when pmtud_running and don't force a run to avoid lock...
Fabio M. Di Nitto [Mon, 8 Jan 2018 11:09:40 +0000 (12:09 +0100)]
[PMTUd] only notify PMTUd when pmtud_running and don't force a run to avoid lock fighting

When we request a writelock, we should notify PMTUd to abort and cond_signal only
if PMTUd is running.

Also, don't request an immediate rerun as we cannot guarantee that the scheduling
is favourable to our request and we could end up waiting forever.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[stats] show loopback links as connected
Fabio M. Di Nitto [Mon, 8 Jan 2018 11:08:32 +0000 (12:08 +0100)]
[stats] show loopback links as connected

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #105 from kronosnet/scale
Fabio M. Di Nitto [Fri, 5 Jan 2018 09:15:37 +0000 (10:15 +0100)]
Merge pull request #105 from kronosnet/scale

Scale

6 years ago[PMTUd] more typo fixes
Fabio M. Di Nitto [Thu, 4 Jan 2018 16:45:50 +0000 (17:45 +0100)]
[PMTUd] more typo fixes

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agomeeeehhhhhh fixed on the top comment, forgot the bottom one
Fabio M. Di Nitto [Thu, 4 Jan 2018 16:44:16 +0000 (17:44 +0100)]
meeeehhhhhh fixed on the top comment, forgot the bottom one

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] cleanup variable usage and code around it
Fabio M. Di Nitto [Thu, 4 Jan 2018 16:38:56 +0000 (17:38 +0100)]
[PMTUd] cleanup variable usage and code around it

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agofix missing space
Christine Caulfield [Thu, 4 Jan 2018 15:43:10 +0000 (15:43 +0000)]
fix missing space

6 years ago[PMTUd] amend warning message
Fabio M. Di Nitto [Sun, 31 Dec 2017 05:44:00 +0000 (06:44 +0100)]
[PMTUd] amend warning message

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] generate warning when there is a timeout receiving a response
Fabio M. Di Nitto [Sun, 31 Dec 2017 05:32:40 +0000 (06:32 +0100)]
[PMTUd] generate warning when there is a timeout receiving a response

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] if PMTUd is rescheduled, then enforce a new run
Fabio M. Di Nitto [Sat, 30 Dec 2017 10:07:41 +0000 (11:07 +0100)]
[PMTUd] if PMTUd is rescheduled, then enforce a new run

the usleep between each PMTUd run will give time to the other threads to grab the wrlock

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] make PMTUd force_run notification more quiet
Fabio M. Di Nitto [Sat, 30 Dec 2017 05:30:41 +0000 (06:30 +0100)]
[PMTUd] make PMTUd force_run notification more quiet

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PTMUd] if any threads receives a EMSGSIZE outside of a PMTUD run, force PTMUd to run
Fabio M. Di Nitto [Sat, 30 Dec 2017 05:19:13 +0000 (06:19 +0100)]
[PTMUd] if any threads receives a EMSGSIZE outside of a PMTUD run, force PTMUd to run

Scenario:

node X has MTU Y on the interface and application is sending packets with size >= Y.

The interface MTU is suddenly reduced to < Y

Before this change, the kernel would be dropping packets till the next PMTUd run.

After this change, the PMTUd will be informed that it has to rerun (overriding
the pmtud_interval), reducing the packet drop to a minimum.

How to test:

force knet_bench to send 1500 size packets with ping_data (requires code change)
and start it.

reduce MTU on the interface from 1500 to 1300 (for example)

Notice an immediate trigger of PMTUd run in debug mode

Note: going up, from 1300 to 1500 will wait for the next PMTUd re-run as there
is no immediate way to detect this change unless we start listening to kernel
netlink sockets with libnl3 (investigation in progress but not critical enough atm).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] rename pmtud_running to pmtud_waiting
Fabio M. Di Nitto [Sat, 30 Dec 2017 04:33:59 +0000 (05:33 +0100)]
[PMTUd] rename pmtud_running to pmtud_waiting

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PTMUd] by using a safe PMTU to init a link, we can shave down corosync membership...
Fabio M. Di Nitto [Fri, 29 Dec 2017 08:53:49 +0000 (09:53 +0100)]
[PTMUd] by using a safe PMTU to init a link, we can shave down corosync membership creation by 25%

tested on a 9 node cluster with 2 links each node, going down from 4 seconds to 3 seconds

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[PMTUd] Use kernel MTU information to determine next packet size during discovery
Fabio M. Di Nitto [Fri, 29 Dec 2017 05:26:00 +0000 (06:26 +0100)]
[PMTUd] Use kernel MTU information to determine next packet size during discovery

Using this information we can, for good links (*), determine and verify the link
MTU with 2 packets.

* good links means:
node X has MTU Y configured on a given interface. Any network object between node X
and destination is capable of handling MTU >= Y.
In no case the kernel will allow us to send packets > Y.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[stats] report correct MTU for loopback links
Fabio M. Di Nitto [Wed, 27 Dec 2017 05:37:20 +0000 (06:37 +0100)]
[stats] report correct MTU for loopback links

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #108 from kronosnet/minor-fixes
Fabio M. Di Nitto [Wed, 3 Jan 2018 13:29:04 +0000 (14:29 +0100)]
Merge pull request #108 from kronosnet/minor-fixes

Minor fixes

6 years ago[tests] add missing break (detected by newer gcc)
Fabio M. Di Nitto [Wed, 3 Jan 2018 11:38:04 +0000 (12:38 +0100)]
[tests] add missing break (detected by newer gcc)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] knet_bench: allow to specify protocol (UDP/SCTP) per link
Fabio M. Di Nitto [Wed, 3 Jan 2018 10:05:46 +0000 (11:05 +0100)]
[tests] knet_bench: allow to specify protocol (UDP/SCTP) per link

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] knet_bench: add machine parsable output
Fabio M. Di Nitto [Wed, 3 Jan 2018 09:23:15 +0000 (10:23 +0100)]
[tests] knet_bench: add machine parsable output

this is done by adding prefixes to different messages to make it easier
to grep/awk and changing format of [perf] to reflect cpghum syntax.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] knet_bench allow to configure PMTUd interval from CLI
Fabio M. Di Nitto [Wed, 3 Jan 2018 08:27:08 +0000 (09:27 +0100)]
[tests] knet_bench allow to configure PMTUd interval from CLI

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] fix regression in knet_bench introduced accidentaly by 2052faab4376107fe99e8a...
Fabio M. Di Nitto [Wed, 3 Jan 2018 07:58:50 +0000 (08:58 +0100)]
[tests] fix regression in knet_bench introduced accidentaly by 2052faab4376107fe99e8a3f955bbcbfa426f648

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[openssl] drop unnecessary reference counter
Fabio M. Di Nitto [Wed, 3 Jan 2018 06:12:43 +0000 (07:12 +0100)]
[openssl] drop unnecessary reference counter

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #109 from kronosnet/lzo2
wferi [Wed, 3 Jan 2018 11:56:24 +0000 (12:56 +0100)]
Merge pull request #109 from kronosnet/lzo2

build: work around broken pkg-config file in lzo2 version 2.10

6 years agobuild: work around broken pkg-config file in lzo2 version 2.10
Ferenc Wágner [Tue, 2 Jan 2018 21:33:08 +0000 (22:33 +0100)]
build: work around broken pkg-config file in lzo2 version 2.10

In principle this isn't specific to BSD, though 2.10 is only packaged
for BSDs at the moment.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #106 from kronosnet/openssl-fixes
Fabio M. Di Nitto [Tue, 2 Jan 2018 19:04:52 +0000 (20:04 +0100)]
Merge pull request #106 from kronosnet/openssl-fixes

[openssl] fix openssl1.0 crash by implementing documented locking cal…

6 years ago[openssl] fix openssl1.0 crash by implementing documented locking callbacks
Fabio M. Di Nitto [Tue, 2 Jan 2018 16:23:02 +0000 (17:23 +0100)]
[openssl] fix openssl1.0 crash by implementing documented locking callbacks

openssl < 1.1.0 do not support natively multithread applications and need
some extra help from the application itself to provide locking callbacks.

https://www.openssl.org/docs/man1.0.2/crypto/threads.html
https://www.openssl.org/blog/blog/2017/02/21/threads/

to test this fix is necessary to use knet_bench or corosync with openssl
and lots of heavy load (perf benchmark) workload. Sooner or later
the application will crash with some random tracebacks.

after this patch, the crash cannot be reproduced anymore.

tested using 9 nodes x2 active/active links all running corosync + cpghum

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #99 from kronosnet/skip
Fabio M. Di Nitto [Tue, 19 Dec 2017 14:50:52 +0000 (15:50 +0100)]
Merge pull request #99 from kronosnet/skip

Skip tests if socket buffers are inadequate

6 years agoRemove spaces after function names
Ferenc Wágner [Tue, 19 Dec 2017 14:01:50 +0000 (15:01 +0100)]
Remove spaces after function names

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoAnything that stops operation and returns an error should be log_err
Ferenc Wágner [Tue, 19 Dec 2017 13:58:09 +0000 (14:58 +0100)]
Anything that stops operation and returns an error should be log_err

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoDocument knet-specific errno values
Ferenc Wágner [Tue, 19 Dec 2017 11:18:14 +0000 (12:18 +0100)]
Document knet-specific errno values

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMore fine-grained error handling
Ferenc Wágner [Tue, 19 Dec 2017 11:17:50 +0000 (12:17 +0100)]
More fine-grained error handling

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agotests: skip if socket buffers are too small
Ferenc Wágner [Mon, 18 Dec 2017 20:38:50 +0000 (21:38 +0100)]
tests: skip if socket buffers are too small

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agotests: replace open coded error handling with knet_handle_start() calls
Ferenc Wágner [Mon, 18 Dec 2017 20:31:45 +0000 (21:31 +0100)]
tests: replace open coded error handling with knet_handle_start() calls

Done by:
$ sed -i -e '1h;2,$H;$!d;g' -e 's/knet_h = knet_handle_new(1, logfds\[1\], \(KNET_LOG_[A-Z]*\));\n\n\tif (!knet_h) {\n\t\tprintf("knet_handle_new failed: %s\\n", strerror(errno));\n\t\tflush_logs(logfds\[0\], stdout);\n\t\tclose_logpipes(logfds);\n\t\texit(FAIL);\n\t}/knet_h = knet_handle_start(logfds, \1);/g' libknet/tests/*.c

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agotests: introduce knet_handle_start helper
Ferenc Wágner [Mon, 18 Dec 2017 18:08:31 +0000 (19:08 +0100)]
tests: introduce knet_handle_start helper

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoReport ENAMETOOLONG if socket buffers are too small
Ferenc Wágner [Sat, 16 Dec 2017 21:00:37 +0000 (22:00 +0100)]
Report ENAMETOOLONG if socket buffers are too small

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #103 from kronosnet/mtu-lock
Fabio M. Di Nitto [Tue, 19 Dec 2017 10:28:14 +0000 (11:28 +0100)]
Merge pull request #103 from kronosnet/mtu-lock

[PMTUd] fix external API and PMTUd interaction

6 years ago[PMTUd] fix external API and PMTUd interaction
Fabio M. Di Nitto [Sun, 17 Dec 2017 08:33:53 +0000 (09:33 +0100)]
[PMTUd] fix external API and PMTUd interaction

The problem:

PMTUd can take a long time to release the global read lock, mostly due
to the pthread_cond_timedwait required to ack/nack packets from the
other hosts. This delay could block any wrlock operation for several seconds
if not more.

The solution:

each call to the global pthread_rwlock_wrlock has been changed to a wrapper
that will notify the PMTUd to interrupt its operations (and restart) first,
then get a global write lock that is queued as soon as PMTUd is going out.

This solution also improves a lot shutdown speed.

How to test:

This is not super simple to test and verify. I used 2 VMs with known MTU of
1500. Start knet_bench on both (normal ping_data -C is more than enough).
Once they have established data exchange, change the MTU on one of the nodes
to 1600 (or higher). This should guarantee that the PMTUd process will take
a very long time to complete.
First verify that the PMTUd process takes several seconds.
Once the next PMTUd run starts, hit ctrl+c on the node that is executing
the PMTUd and the process should exit much faster than before this patch.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #104 from kronosnet/spelling
Fabio M. Di Nitto [Mon, 18 Dec 2017 19:13:06 +0000 (20:13 +0100)]
Merge pull request #104 from kronosnet/spelling

Spelling fixes

6 years agoFix typo and capitalization
Ferenc Wágner [Sun, 17 Dec 2017 20:49:20 +0000 (21:49 +0100)]
Fix typo and capitalization

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoFix grammar (allow requires an object)
Ferenc Wágner [Sun, 17 Dec 2017 20:48:00 +0000 (21:48 +0100)]
Fix grammar (allow requires an object)

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #102 from kronosnet/clang v0.9
Fabio M. Di Nitto [Fri, 15 Dec 2017 16:39:27 +0000 (17:39 +0100)]
Merge pull request #102 from kronosnet/clang

Clang

6 years ago[build] define conditionals only once
Fabio M. Di Nitto [Fri, 15 Dec 2017 10:34:01 +0000 (11:34 +0100)]
[build] define conditionals only once

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] workaround BSD / clang breakage
Fabio M. Di Nitto [Fri, 15 Dec 2017 08:34:43 +0000 (09:34 +0100)]
[build] workaround BSD / clang breakage

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] fix clang builds
Fabio M. Di Nitto [Fri, 15 Dec 2017 07:02:33 +0000 (08:02 +0100)]
[build] fix clang builds

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #101 from kronosnet/mtu2
Fabio M. Di Nitto [Fri, 15 Dec 2017 09:22:17 +0000 (10:22 +0100)]
Merge pull request #101 from kronosnet/mtu2

[PMTUd] fix multiple issues and stability problems

6 years ago[PMTUd] fix multiple issues and stability problems
Fabio M. Di Nitto [Thu, 14 Dec 2017 03:11:56 +0000 (04:11 +0100)]
[PMTUd] fix multiple issues and stability problems

- resolve locking issue with thread_heartbeat that was causing
  spurious up/down link event.
  In the event of a PMTUd run taking too long, the heartbeat
  thread could hang for much longer than ping_timeout.
  Use backoff_mutex to sync between threads instead of the global lock.

- pause the DATA tx thread when sending any PMTUd related packets.
  Similar method as knet_send_sync, using the tx_mutex, allows a much
  more stable communication between nodes without any visible performance
  hit.

- calculate higher timeouts when using crypto to improve stability

- fix an odd race condition with the kernel where, during a single PMTUd run,
  the same packet size was marked both BAD and GOOD (via EMSGSIZE) by the
  kernel. That situation would cause our PMTUd to run away and calculate
  bad values.

- add a minor usleep between sending PMTUd packets to give time to the
  kernel to make its own mind about the link PMTU. This is based on average
  latency.

- since PMTUd can take several seconds before completion, use the "end time"
  to record the last run vs the start time.

- fix a major issue in sending PMTUd reply where an errno was not being
  passed down the link layer and would cause the RX thread to block forever.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #98 from liu4480/add-debuginfo
Fabio M. Di Nitto [Sat, 9 Dec 2017 05:16:58 +0000 (06:16 +0100)]
Merge pull request #98 from liu4480/add-debuginfo

allow to choose whether to build debuginfo packages or not

6 years agoallow to choose whether to build debuginfo packages or not
Bin Liu [Thu, 7 Dec 2017 06:48:57 +0000 (14:48 +0800)]
allow to choose whether to build debuginfo packages or not

1. If not "--enable-rpm-debuginfo" or "--disable-rpm-debuginfo" is
specified, follow the system default behavior
2. If set, then build debuginfo package or not build based on the
flag.

6 years agoMerge pull request #96 from kronosnet/modules2
Fabio M. Di Nitto [Tue, 5 Dec 2017 07:54:24 +0000 (08:54 +0100)]
Merge pull request #96 from kronosnet/modules2

Modules2

6 years agobuild: remove useless assignment
Ferenc Wágner [Mon, 4 Dec 2017 22:27:56 +0000 (23:27 +0100)]
build: remove useless assignment

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: use AS_HELP_STRING for consistent formatting
Ferenc Wágner [Mon, 4 Dec 2017 22:25:58 +0000 (23:25 +0100)]
build: use AS_HELP_STRING for consistent formatting

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: recover original option ordering
Ferenc Wágner [Mon, 4 Dec 2017 22:00:52 +0000 (23:00 +0100)]
build: recover original option ordering

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agobuild: move more repetitive module work into our Autoconf macro
Ferenc Wágner [Mon, 4 Dec 2017 21:44:08 +0000 (22:44 +0100)]
build: move more repetitive module work into our Autoconf macro

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoCheck ABI version on module load
Ferenc Wágner [Mon, 4 Dec 2017 21:39:20 +0000 (22:39 +0100)]
Check ABI version on module load

Signed-off-by: Ferenc Wágner <wferi@debian.org>