Commit Graph

151 Commits (3753dfbddbf8928b75de481071e506fe85952803)

Author SHA1 Message Date
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.
4 years ago
Jeff Becker 3b424f76f1
strict check of bounds 4 years ago
Jeff Becker b398076bc6
add bounds check 4 years ago
Jeff Becker b96700579e
remove un needed check 4 years ago
Jeff Becker 53e7397935
fix use after move 4 years ago
Jeff Becker 769bafd281
disable accedental fec in iwp outbound messages 4 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 4 years ago
Jeff Becker ecdab10dac
explictly use std::chrono::milliseconds 4 years ago
Jeff Becker df427ffa0e
use llarp_time_t instead of auto 4 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 4 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
4 years ago
Jeff 5901d0eb6b
Merge pull request #1092 from majestrate/reduce-iwp-multiack-frequency-2020-02-10
Reduce iwp multiack transmission frequency
4 years ago
Jeff Becker 8b77ec31ef
reduce number of multiack packets sent 4 years ago
Stephen Shelton 3d00feb08a
Make format 4 years ago
Stephen Shelton 7f0972d48e
Use name 'StateToString()' instead of ambiguous 'toString()' 4 years ago
Stephen Shelton 63ad7c8b91
Leave IWP session JSON stats 'tx' and 'rx' for compat 4 years ago
Stephen Shelton 2279ebeb40
Add IWP session stats to JSON API 4 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 4 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