Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions include/udx.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ struct udx_socket_s {
#define UDX_CA_RECOVERY 2
#define UDX_CA_LOSS 3

typedef enum {
UDX_TIMER_NONE,
UDX_TIMER_RTO,
UDX_TIMER_RACK_REO,
UDX_TIMER_TLP,
UDX_TIMER_ZWP,
UDX_TIMER_KEEPALIVE
} udx_stream_timer_type_t;

struct udx_stream_s {
uint32_t local_id; // must be first entry, so its compat with the cirbuf
uint32_t remote_id;
Expand Down Expand Up @@ -293,6 +302,8 @@ struct udx_stream_s {
uint32_t rate_interval_ms; // saved rate sample: time elapsed
bool rate_sample_is_app_limited; // saved rate sample: app limited?

udx_stream_timer_type_t pending_timer;
uint64_t next_rto_ts; // todo: remove this, calculate from oldest packet (head) in rtx queue
uint32_t srtt;
uint32_t rttvar;
uint32_t rto;
Expand Down Expand Up @@ -360,12 +371,8 @@ struct udx_stream_s {
bool tlp_permitted; // if set, srtt has been updated since the last tlp
uint32_t tlp_end_seq; // seq at time of tlp sent. invalid if tlp_inflight is not set

// optimize: use one timer and a action (RTO, RACK_REO, TLP) variable
int nrefs;
uv_timer_t rto_timer;
uv_timer_t rack_reo_timer;
uv_timer_t tlp_and_keepalive_timer;
uv_timer_t zwp_timer;
int nrefs; // # of libuv handles open (2 timer, 1 prepare)
uv_timer_t timer; // RTO, RACK_REO,TLP, ZWP and keepalive timer. stream.pending_timer tells which is currently set (if any)
uv_timer_t refill_pacing_timer;

size_t inflight;
Expand Down
Loading