Branch: refs/heads/master
Home:
https://github.com/kronosnet/kronosnet
Commit: 16a9190616b3875232c7ad26efde6b2eb0cb2c1b
https://github.com/kronosnet/kronosnet/commit/16a9190616b3875232c7ad26efde6…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2019-08-12 (Mon, 12 Aug 2019)
Changed paths:
M libknet/Makefile.am
M libknet/crypto.c
M libknet/crypto_model.h
M libknet/crypto_nss.c
M libknet/crypto_openssl.c
M libknet/internals.h
M libknet/links.c
A libknet/onwire.c
M libknet/onwire.h
M libknet/tests/Makefile.am
M libknet/tests/api_knet_send_crypto.c
A libknet/tests/fun_pmtud_crypto.c
M libknet/threads_common.c
M libknet/threads_pmtud.c
Log Message:
-----------
[PMTUd] rework the whole math to calculate MTU
internal changes:
- drop the concept of sec_header_size that was completely wrong
and unnecessary
- bump crypto API to version 3 due to the above change
- clarify the difference between link->proto_overhead and
link->status->proto_overhead. We cannot rename the status
one as it would also change ABI.
- add onwire.c with documentation on the packet format
and what various len(s) mean in context.
- add 3 new functions to calculate MTUs back and forth
and use them around, hopefully with enough clarification
on why things are done in a given way.
- heavily change thread_pmtud.c to use those new facilities.
- fix major calculation issues when using crypto (non-crypto
was not affected by the problem).
- fix checks around to make sure they match the new math.
- fix padding calculation.
- add functional PMTUd crypto test
this test can take several hours (12+) and should be executed
on a controlled environment since it automatically changes
loopback MTU to run tests.
- fix way the lowest MTU is calculated during a PMTUd run
to avoid spurious double notifications.
- drop redundant checks.
user visible changes:
- Global MTU is now calculated properly when using crypto
and values will be in general bigger than before due
to incorrect padding calculation in the previous implementation.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Commit: 434299300a2f23acd96f2f287939549ab2944411
https://github.com/kronosnet/kronosnet/commit/434299300a2f23acd96f2f2879395…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2019-08-13 (Tue, 13 Aug 2019)
Changed paths:
M libknet/internals.h
M libknet/links.c
M libknet/links.h
M libknet/threads_pmtud.c
Log Message:
-----------
[PMTUd] add dynamic pong timeout when using crypto
problem originally reported by proxmox community, users
observed that under pressure the MTU would flap back and forth
between 2 values due to other node response timeout.
implement a dynamic timeout multiplier when using crypto that
should solve the problem in a more flexible fashion.
When a timeout hits, those new logs will show:
[knet]: [info] host: host: 1 (passive) best link: 0 (pri: 0)
[knet]: [debug] pmtud: Starting PMTUD for host: 1 link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (4) for host 1
link: 0
[knet]: [info] pmtud: PMTUD link change for host: 1 link: 0 from 469 to 65429
[knet]: [debug] pmtud: PMTUD completed for host: 1 link: 0 current link mtu: 65429
[knet]: [info] pmtud: Global data MTU changed to: 65429
[knet]: [debug] pmtud: Starting PMTUD for host: 1 link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (8) for host 1
link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (16) for host 1
link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (32) for host 1
link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (64) for host 1
link: 0
[knet]: [debug] pmtud: PMTUD completed for host: 1 link: 0 current link mtu: 65429
[knet]: [debug] pmtud: Starting PMTUD for host: 1 link: 0
[knet]: [debug] pmtud: Increasing PMTUd response timeout multiplier to (128) for host 1
link: 0
[knet]: [debug] pmtud: PMTUD completed for host: 1 link: 0 current link mtu: 65429
and when the latency reduces and it is safe to be more responsive again:
[knet]: [debug] pmtud: Starting PMTUD for host: 1 link: 0
[knet]: [debug] pmtud: Decreasing PMTUd response timeout multiplier to (64) for host 1
link: 0
[knet]: [debug] pmtud: PMTUD completed for host: 1 link: 0 current link mtu: 65429
....
testing this patch on normal hosts is a bit challenging tho.
Patch was tested by hardcoding a super low timeout here:
diff --git a/libknet/threads_pmtud.c b/libknet/threads_pmtud.c
index 4f0ba0f..5e2b89b 100644
--- a/libknet/threads_pmtud.c
+++ b/libknet/threads_pmtud.c
@@ -261,7 +271,8 @@ retry:
/*
* crypto, under pressure, is a royal PITA
*/
- pong_timeout_adj_tmp = dst_link->pong_timeout_adj * 2;
+ //pong_timeout_adj_tmp = dst_link->pong_timeout_adj *
dst_link->pmtud_crypto_timeout_multiplier;
+ pong_timeout_adj_tmp = 30 *
dst_link->pmtud_crypto_timeout_multiplier;
} else {
pong_timeout_adj_tmp = dst_link->pong_timeout_adj;
}
and using a long running version of api_knet_send_crypto_test with a short PMTUd setfreq
(10 sec).
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Commit: 5a49e03f40c85ae6bf0d0b0ab9e16c8128a53c36
https://github.com/kronosnet/kronosnet/commit/5a49e03f40c85ae6bf0d0b0ab9e16…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2019-08-20 (Tue, 20 Aug 2019)
Changed paths:
M libknet/handle.c
M libknet/internals.h
M libknet/libknet.h
M libknet/tests/api-check.mk
A libknet/tests/api_knet_handle_pmtud_set.c
M libknet/threads_pmtud.c
M man/Makefile.am
Log Message:
-----------
[PMTUd] add ability to manually override MTU and disable PMTUd
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Commit: 657f43fd4345afed3546181361bae6889c3c40d8
https://github.com/kronosnet/kronosnet/commit/657f43fd4345afed3546181361bae…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2019-08-21 (Wed, 21 Aug 2019)
Changed paths:
M libknet/Makefile.am
M libknet/crypto.c
M libknet/crypto_model.h
M libknet/crypto_nss.c
M libknet/crypto_openssl.c
M libknet/handle.c
M libknet/internals.h
M libknet/libknet.h
M libknet/links.c
M libknet/links.h
A libknet/onwire.c
M libknet/onwire.h
M libknet/tests/Makefile.am
M libknet/tests/api-check.mk
A libknet/tests/api_knet_handle_pmtud_set.c
M libknet/tests/api_knet_send_crypto.c
A libknet/tests/fun_pmtud_crypto.c
M libknet/threads_common.c
M libknet/threads_pmtud.c
M man/Makefile.am
Log Message:
-----------
Merge pull request #245 from kronosnet/pmtud-fixes
[PMTUd] rework the whole math to calculate MTU
Compare:
https://github.com/kronosnet/kronosnet/compare/9a31008b5642...657f43fd4345