Commit Graph

139 Commits (d02558350a2be63789242a97a868e8a5faf06fba)

Author SHA1 Message Date
Jason Rhinelander d02558350a
Crank oxen-mq to (1.2.)11; switch to oxen-encoding
- Update oxen-mq submodule to latest stable
- Add oxen-encoding submodule
- Convert all oxenmq encoding usage to oxenc
- Modernize cmake handling of oxenmq/oxenc
2 years ago
Jeff Becker ec8d990163
demote log statement levels 3 years ago
Jason Rhinelander b2ee003329 Optimization: eliminate unneeded shared_ptrs
We have a few cases where we're making an extra shared_ptr which we copy
into a lambda, which then results in an extra unnecessary refcount
decrement in the parent; this changes them to give an rvalue reference
to the lambda to avoid the extra incr/decr instead.

The one in Session::Pump is particularly noticeable and shows up in
profiling.
3 years ago
Jason Rhinelander e47d3098ac Increase plaintext queue size from 32 to 512
In testing we were sometimes hitting a full queue error, which makes
sense because the queue size seems really small.

Increase it to 512.
3 years ago
Jason Rhinelander 78cc466bf2 Rename PumpLL -> TriggerPump
And rename the actual pump implementation back to PumpLL.
3 years ago
Jason Rhinelander 74215fc44c Fix link layer delivery race condition (fix random ping delays)
We trigger a pump immediately, but this is racey because we add to our
plaintext data in a worker thread; if the worker thread runs after the
pump then it ends up leaving plaintext to be handled, but there's no
wakeup until the next one.

This was the cause of seeing a random +1s and bunching added to ping
responses sometimes: it wasn't until the *next* ping goes through the
network that the plaintext queue gets processed, at which point it
flushes the old one and often the new one together.

The fix here gets rid of the map of sessions needing wakeups and instead
adds an atomic flag to all of them to let us figure out which ones
need to be flushed.
3 years ago
Jason Rhinelander 362fda5a56 Combine empty + pop into single call 3 years ago
Jason Rhinelander 9113a6b36b Triggered pumping
This redoes how/when we pump so that we should only be calling the
idempotent PumpLL() when we actually have (or may have) something to
pump.
3 years ago
Jason Rhinelander 50449038b4 Another gcc-11 fix
GCC is wrongly warning that `h` is uninitialized here, but it clearly
isn't.  Work around it.
3 years ago
Jeff Becker 20bc338eba
inbound sessions from CLIENTS should only have an elevated lifetime 3 years ago
Jeff Becker caddeef2e8
more information in logs 3 years ago
Jeff Becker 1aa2146b4a
for inbound sessions, keep them alive for the default session lifetime, for outbound sessions keep alive for 5 ping intervals 3 years ago
Jeff Becker e058b873b6
Revert "tweak timeout parameters for link layer."
This reverts commit eef192b37aec070d624e84cedfc94f522fd0a346.
3 years ago
Jeff Becker 657c39a91c
tweak timeout parameters for link layer.
have different timeouts for service node vs client
3 years ago
Jeff Becker e005b34169
fix up some retarded bullshit
* llarp::service::NameIsValid was not checking that the tld was .loki, add this check.
* make link layer initial connection timeout 5s not the session activity timeout which happens to be 60 god damn seconds.
3 years ago
Jeff Becker 5b05d22bad
refactors
* add path sequence numbers on routing messages
* reduce log level in debug mode
* wire up loopback style sending to ourself
3 years ago
Jeff Becker 7a1ffc2df4
* lessen replay filter window
* dont have transit hops use a replay filter
* formatting
3 years ago
Jeff Becker 9c742b36eb
call delivery status hook on overload 3 years ago
Thomas Winget 7caa87862e standardize include format and pragma once
All #ifndef guards on headers have been removed, I think,
in favor of #pragma once

Headers are now included as `#include "filename"` if the included file
resides in the same directory as the file including it, or any
subdirectory therein.  Otherwise they are included as
`#include <project/top/dir/relative/path/filename>`

The above does not include system/os headers.
3 years ago
Jason Rhinelander 91d6698a9d Reformat with clang-format-11 3 years ago
Jeff Becker 7dbd25f271
don't leave old multi ack codepath in 3 years ago
Jeff Becker ad3c23ba2b
simplify call 3 years ago
Jeff Becker 5cffc3b0f8
consolidate rx message handling in iwp
* add toggle flag for using multi ack
* check replay filter before processing message
3 years ago
Jeff Becker 74f707ee01
only do single ack packets 3 years ago
Jeff Becker 1c3020a05e
drop on overload 3 years ago
Jeff Becker bb9bd25059
get rid of use of llarp::IpAddress from hotpaths 3 years ago
Jeff Becker 42ffbcca0a
try coleasing inbound packets from iwp 3 years ago
Jeff 28bfaf0372
ammend log levels for common spammy log events (#1375) 4 years ago
Stephen Shelton b2a72dd46a
Initial test_peer_stats hive test 4 years ago
Stephen Shelton d897099e1d
Track traffic peerstats 4 years ago
Jeff Becker f4971a88fd
use lokimq workers instead of llarp:🧵:ThreadPool 4 years ago
Stephen Shelton 91a2af0eda
Sanity checks around shared_from_this() 4 years ago
Jeff Becker 44c790b65c
revert back to for loop for simplicity 4 years ago
Jeff Becker db00d080f6
use std::list instead of std::vector because idfk man 4 years ago
Jeff Becker 96cbab33c3
style: put iterator erase in for loop update 4 years ago
Jeff Becker 44ff3a9928
copy assignment so we don't crash 4 years ago
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.
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 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 d2d109e92c
llarp_time_t is now using std::chrono 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