Commit Graph

205 Commits (a51576d1ea1e0969013d4b3e796adfa6886802ab)

Author SHA1 Message Date
Jeff Becker 149a01c80f
dont use std::bind, use lambda 4 years ago
Jeff Becker 3a776b3ed1
bounds checks and such 4 years ago
Jeff Becker 3eb006f78c
iwp/libuv cleanup: remove llarp_pkt_list and all users of it as it's broke 4 years ago
Jeff Becker e56faba23d
make format 4 years ago
Jason Rhinelander dccc663f31 Miss Match demands her name be removed from the code
(i.e. fix speeling mistack: missmatch -> mismatch)
4 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 4 years ago
Stephen Shelton 273270916e
The Great Wall of Blame
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.

Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
5 years ago
Jeff Becker 3b424f76f1
strict check of bounds 5 years ago
Jeff Becker b398076bc6
add bounds check 5 years ago
Jeff Becker b96700579e
remove un needed check 5 years ago
Jeff Becker 53e7397935
fix use after move 5 years ago
Jeff Becker 769bafd281
disable accedental fec in iwp outbound messages 5 years ago
Jeff Becker bf0416cab8
remove Time_t, add operator overload for printing llarp_time_t and add to_json function for serializing llarp_time_t to json 5 years ago
Jeff Becker ecdab10dac
explictly use std::chrono::milliseconds 5 years ago
Jeff Becker df427ffa0e
use llarp_time_t instead of auto 5 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 5 years ago
Jason Rhinelander b4440094b0 De-abseil, part 2: mutex, locks, (most) time
- util::Mutex is now a std::shared_timed_mutex, which is capable of
  exclusive and shared locks.

- util::Lock is still present as a std::lock_guard<util::Mutex>.

- the locking annotations are preserved, but updated to the latest
  supported by clang rather than using abseil's older/deprecated ones.

- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
  locks anymore (WTF abseil).

- ReleasableLock is gone.  Instead there are now some llarp::util helper
  methods to obtain unique and/or shared locks:
    - `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
      unlockable object (std::unique_lock<T>, with T inferred from
      `mutex`).
    - `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
      "reader") lock of the mutex.
    - `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
      used to atomically lock multiple mutexes at once (returning a
      tuple of the locks).
  This are templated on the mutex which makes them a bit more flexible
  than using a concrete type: they can be used for any type of lockable
  mutex, not only util::Mutex.  (Some of the code here uses them for
  getting locks around a std::mutex).  Until C++17, using the RAII types
  is painfully verbose:

  ```C++
  // pre-C++17 - needing to figure out the mutex type here is annoying:
  std::unique_lock<util::Mutex> lock(mutex);
  // pre-C++17 and even more verbose (but at least the type isn't needed):
  std::unique_lock<decltype(mutex)> lock(mutex);
  // our compromise:
  auto lock = util::unique_lock(mutex);
  // C++17:
  std::unique_lock lock(mutex);
  ```

  All of these functions will also warn (under gcc or clang) if you
  discard the return value.  You can also do fancy things like
  `auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
  lock take over an already-locked mutex).

- metrics code is gone, which also removes a big pile of code that was
  only used by metrics:
  - llarp::util::Scheduler
  - llarp:🧵:TimerQueue
  - llarp::util::Stopwatch
5 years ago
Jeff 5901d0eb6b
Merge pull request #1092 from majestrate/reduce-iwp-multiack-frequency-2020-02-10
Reduce iwp multiack transmission frequency
5 years ago
Jeff Becker 8b77ec31ef
reduce number of multiack packets sent 5 years ago
Stephen Shelton 3d00feb08a
Make format 5 years ago
Stephen Shelton 7f0972d48e
Use name 'StateToString()' instead of ambiguous 'toString()' 5 years ago
Stephen Shelton 63ad7c8b91
Leave IWP session JSON stats 'tx' and 'rx' for compat 5 years ago
Stephen Shelton 2279ebeb40
Add IWP session stats to JSON API 5 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 5 years ago
Jeff Becker 0f6c5958ba
add bw stats to iwp sessions 5 years ago
Jeff Becker fc55469cfe
change interval such that FEC is less often done 5 years ago
Jeff Becker a93e0a735b
fix typo, reduce delivery timeout 5 years ago
Jeff Becker fcd3750a8b
increase ack window 5 years ago
Stephen Shelton 68a604070b
Merge pull request #945 from notlesh/key_manager_cleanup
Key manager cleanup (post 0.6-rc1)
5 years ago
Stephen Shelton 66a058a2af Make format 5 years ago
Jeff Becker 9be4092a2a
more close changes 5 years ago
Jeff 27b1e36039
Merge pull request #936 from majestrate/dev
last changes before 0.6.0 version bump
5 years ago
Stephen Shelton 49e248bfc1 Fix bad merge 5 years ago
Stephen Shelton 93b8832026
Merge branch 'dev' into private-keys-backup-support 5 years ago
Stephen Shelton 521ef9b5bb Handle link transport key in KeyManager 5 years ago
Jeff Becker 86a4ccd98f
unconditionally bundle first fragment in xmit 5 years ago
Jeff Becker 1f83fdb190
fix previous commit 5 years ago
Jeff Becker 19835ce501
dont use auto 5 years ago
Jeff Becker 1a6a66108d
make it compile 5 years ago
Jeff Becker c88602ee16
break the world to make it faster 5 years ago
Jeff Becker 1a06da9c3d reduce calls in link pump 5 years ago
Jeff Becker ac686a9329
remove valgrind access errors 5 years ago
Jeff Becker b207db626f
please the gods of valgrind 5 years ago
Jeff Becker 56dce90de9
add trace log level for tracking logic thread jobs 5 years ago
Jason Rhinelander d96d33329b
Merge pull request #912 from majestrate/logic-thread-fix-2019-11-13
fix logic thread behavior
5 years ago
Stephen Shelton b5b8cf0745 Reduce log level of IWP session issues as they may be encountered frequently and normally 5 years ago
Stephen Shelton ef2670dfb4 Drop new inbound IWP sessions when the first packet can't be handled 5 years ago
Jeff Becker b34caa3e26
make unit tests pass for iwp 5 years ago
Jeff Becker c9f26c4911
call Router::PumpLL after every batch of packets from a link session 5 years ago
Jeff Becker 1fc36f4832
changes from review 5 years ago
Jeff Becker 8befd6f2db
flush link session encrypt queue immediately after handling plaintext packets 5 years ago
Jeff Becker e2890e925b
make it compile 5 years ago
Jeff Becker 20dd4e4d09
use data not begin 5 years ago
Jeff Becker 2267a7d283
fix bounds check 5 years ago
jeff 4af6dca246 use static_cast 5 years ago
jeff 3c1d5518d8 fix windows port and make it compile 5 years ago
jeff 32ed821763 Merge remote-tracking branch 'upstream/dev' into multithreaded-cryptography 5 years ago
Michael 86a07e2a80
Enable more sanitisers 5 years ago
Jeff Becker 327c545530
finish multithread cryptography first pass 5 years ago
jeff 14c9ef15ed try calling stuff in logic thread from event loop 5 years ago
jeff ac2a2aed1d gut libutp and finish making things compile and pass tests 5 years ago
Jeff Becker d04762ab49
unstaged changed 5 years ago
Jeff 070a014f85
Merge pull request #799 from majestrate/remove-link-layer-locking
disable link layer locking
5 years ago
Jeff Becker 3c0245f8b3
Merge remote-tracking branch 'github/master' into iwp-multi-ack 5 years ago
Jeff Becker 4bf6882c8a
more async cryptography 5 years ago
Jeff Becker 88cde21b9b
multithreaded iwp cryptography 5 years ago
Jeff Becker 0d3c07999a
break it again just to be sure 5 years ago
Jeff Becker a4160006ab
make it compile 5 years ago
Jeff Becker 3b1a0b2835
add multi-ack and change protocol handshake to pin identity key 5 years ago
Jeff Becker 1adae338ce
Merge remote-tracking branch 'origin/master' 5 years ago
Jeff Becker e9f01923d9
dont nack replayed messages, tweak transmission parameters.
this yields more efficient througput. probably.
5 years ago
Michael 4d8fe2a8a8
Move meta programming to subdirectory 5 years ago
Jeff Becker 2ab265be41
disable link layer locking because there was no contention 5 years ago
Jeff Becker c01112e4b7
tracy lock contention testing and other fun things 5 years ago
Jeff Becker deecbbbdef
optimize 5 years ago
Jeff Becker 83432d7567
make format 5 years ago
Jeff Becker 4c569d83b7
make it compile 5 years ago
Jeff Becker d1e590ce9d
fix sign 5 years ago
Jeff Becker 795ac6bab3
get rid of dead code 5 years ago
Jeff Becker 0986b6ab5e
quick little fixes 5 years ago
Jeff Becker 444d832b7c
correct constructors on llarp_buffer_t and check rc on regen 5 years ago
Jeff Becker 16934cdd20
please the CI gods, wololo 5 years ago
Jeff Becker ba2aaa68c6
add short data fragments and rx replay filter 5 years ago
Jeff Becker 3c2c895593
fix log level 5 years ago
Jeff Becker 4c8da9bb6d
use correct constructor for llarp_buffer_t 5 years ago
Jeff Becker 88f685b74a
add forgotten bits 5 years ago
Jeff Becker 0241851b72
add likn layer delivery timeout notification for iwp 5 years ago
Jeff Becker 94f8531776
more fixups 5 years ago
Jeff Becker 6a48a3b402
code review fixes:
* use std::unordered_set
* use default for ctor/dtor
* don't crash on short packet with nack
5 years ago
Jeff Becker 82ea973137
silence clang errors 5 years ago
Jeff Becker 5f8388b1c0
lower log level for renegotiate 5 years ago
Jeff Becker 7e38a133d8
send keep alive on pump when needed 5 years ago
Jeff Becker d6ec5e7ed7
don't crash 5 years ago
Jeff Becker 461f41a4c6
mark alive on nack 5 years ago
Jeff Becker acf5f78949
update iwp , add NACK 5 years ago
Jeff Becker 426ee41c46
initial iwp 5 years ago
Michael 16cdfbd5f0
clang-tidy modernize pass 5 years ago
Thomas Winget baf8019fe5 Refactor Router code into more classes
This commit refactors functionality from the Router class into separate,
dedicated classes.
There are a few behavior changes that came as a result of discussion on
what the correct behavior should be.
In addition, many things Router was previously doing can now be provided
callback functions to alert the calling point when the asynchronous
action completes, successfully or otherwise.
5 years ago
Michael 75430a234c
Convert to use memFn 5 years ago
Jeff 674f272a46
Merge pull request #630 from majestrate/master
recent stability stuff
5 years ago