Commit Graph

49 Commits (dev)

Author SHA1 Message Date
Jeff 26c8063fc9
convert priority queues 2 years ago
Jeff 8960ca08f3
propagate link layer message priority to link layer so it can order retransmissions with that in mind 2 years ago
Jeff a76acd4956 fix wire protocol race condition
only send close packet once, before we were sending a close after we got a close causing excess log spam.
include handshake phase when checking for connection timeouts.

when we change our rc make sure to put it into nodedb too when we are a service node to prevent weirdness in dht lookups.
2 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 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
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
Jeff Becker c9ff917e0d
revert priority queue ordering change 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 e6ac7e721d
use a std::map instead of a std::unordered_map for holding message buffers by their sequentially increasing message id.
when retransmissions happen, they will be executed in a deterministic order by their delivery id.
this reduces the jitter from delayed message delivery on link layer as with an unordered map the order of iteration is "random",
so when we iterate all messages for retransmission we do it lowest id first (the messages queued first).
3 years ago
Jeff Becker d7842d18ee
add missing header 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
Stephen Shelton d897099e1d
Track traffic peerstats 4 years ago
Jeff Becker d7ff6c579c
address feedback from jason
* split up ipv6 netmask
* revert iwp ack interval change
* c++17-isms in ip range map
* lambda-ize nodedb
* mutable lambdas in transit hops
* perfect forwarding of args in abstract router
* mutable lambdas in lokid rpc client
* notes in readme about nproc
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 db00d080f6
use std::list instead of std::vector because idfk man 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 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
Stephen Shelton 3d00feb08a
Make format 4 years ago
Stephen Shelton 7f0972d48e
Use name 'StateToString()' instead of ambiguous 'toString()' 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 ac686a9329
remove valgrind access errors 5 years ago
Jeff Becker b207db626f
please the gods of valgrind 5 years ago
Stephen Shelton ef2670dfb4 Drop new inbound IWP sessions when the first packet can't be handled 5 years ago
jeff 3c1d5518d8 fix windows port and make it compile 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 Becker 3c0245f8b3
Merge remote-tracking branch 'github/master' into iwp-multi-ack 5 years ago
Jeff Becker 88cde21b9b
multithreaded iwp cryptography 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 e9f01923d9
dont nack replayed messages, tweak transmission parameters.
this yields more efficient througput. probably.
5 years ago
Jeff Becker 83432d7567
make format 5 years ago
Jeff Becker 4c569d83b7
make it compile 5 years ago
Jeff Becker ba2aaa68c6
add short data fragments and rx replay filter 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 acf5f78949
update iwp , add NACK 5 years ago
Jeff Becker 426ee41c46
initial iwp 5 years ago