Branch: refs/heads/coverity_scan Home: https://github.com/kronosnet/kronosnet Commit: 7c470fe6fe90d7a523ca0bfc238ed89e0948f940 https://github.com/kronosnet/kronosnet/commit/7c470fe6fe90d7a523ca0bfc238ed8... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2019-10-09 (Wed, 09 Oct 2019)
Changed paths: M configure.ac M man/Makefile.am
Log Message: ----------- Merge pull request #263 from kronosnet/runtime-debug
[build] add --with-sanitizers= option for sanitizer builds
Commit: a081ff7fab6bb98f9ff2a88b1593776b0c27b6f1 https://github.com/kronosnet/kronosnet/commit/a081ff7fab6bb98f9ff2a88b159377... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2019-10-15 (Tue, 15 Oct 2019)
Changed paths: M libknet/host.c
Log Message: ----------- [host] rename variables to make it easier to read the code
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com
Commit: 1338058fa634b08eee7099c0614e8076267501ff https://github.com/kronosnet/kronosnet/commit/1338058fa634b08eee7099c0614e80... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2019-10-15 (Tue, 15 Oct 2019)
Changed paths: M libknet/host.c
Log Message: ----------- [host] fix defrag buffers reclaim logic
The problem:
- let's assume a 2 nodes (A and B) cluster setup - node A sends fragmented packets to node B and there is packet loss on the network. - node B receives all those fragments and attempts to reassemble them. - node A sends packet seq_num X in Y fragments. - node B receives only part of the fragments and stores them in a defrag buf. - packet loss stops. - node A continues to send packets and a seq_num roll-over takes place. - node A sends a new packet seq_num X in Y fragments. - node B gets confused here because the parts of the old packet seq_num X are still stored and the buffer has not been reclaimed. - node B continues to rebuild packet seq_num X with old stale data and new data from after the roll-over. - node B completes reassembling the packet and delivers junk to the application.
The solution:
Add a much stronger buffer reclaim logic that will apply on each received packet and not only when defrag buffers are needed, as there might be a mix of fragmented and not fragmented packets in-flight.
The new logic creates a window of N packets that can be handled at the same time (based on the number of buffers) and clear everything else.
Fixes https://github.com/kronosnet/kronosnet/issues/261
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com
Commit: aeaffc89bb71a2ab4e5b1f5cce49a20e3c0872e3 https://github.com/kronosnet/kronosnet/commit/aeaffc89bb71a2ab4e5b1f5cce49a2... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2019-10-15 (Tue, 15 Oct 2019)
Changed paths: M libknet/threads_rx.c
Log Message: ----------- [rx] copy data into the defrag buffer only if we know the size of the frame
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com
Commit: 3ed7293c027cc0c5940dabd19f859bf22f00efae https://github.com/kronosnet/kronosnet/commit/3ed7293c027cc0c5940dabd19f859b... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2019-10-15 (Tue, 15 Oct 2019)
Changed paths: M libknet/tests/knet_bench.c
Log Message: ----------- [test] add ability to knet_bench to specify a fixed packet size for perf test
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com
Compare: https://github.com/kronosnet/kronosnet/compare/38e40998ec6b...3ed7293c027c