|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
92 memset (bts, 0xfc,
sizeof (*bts));
148 while (seq != cur->
key)
288 u32 available_bytes, flight_size;
294 if (available_bytes + flight_size + tc->snd_mss < tc->cwnd
296 && tc->sack_sb.lost_bytes <= tc->snd_rxt_bytes)
297 tc->app_limited = tc->delivered + flight_size ? : 1;
308 if (tail && tail->
max_seq == tc->snd_nxt
316 if (tc->snd_una == tc->snd_nxt)
319 tc->first_tx_time = tc->delivered_time;
327 tail->
next = bts_index;
329 bt->
tail = bts_index;
343 u8 is_end =
end == tc->snd_nxt;
348 if (bts && bts->
max_seq == start
362 bts_flags = bts->
flags;
373 prev_index = bts->
prev;
383 cur->
prev = prev_index;
390 next->prev = cur_index;
394 bt->
tail = cur_index;
400 prev->
next = cur_index;
404 bt->
head = cur_index;
424 cur->
prev = bts_index;
460 next->prev = cur_index;
463 bt->
tail = cur_index;
466 bts->
next = cur_index;
489 tc->first_tx_time = bts->
tx_time;
527 if (
seq_lt (blk->end, tc->snd_una))
603 tc->lost += tc->sack_sb.last_lost_bytes;
605 delivered = tc->bytes_acked + tc->sack_sb.last_sacked_bytes;
607 delivered -= tc->sack_sb.last_bytes_delivered;
611 tc->delivered += delivered;
614 if (tc->app_limited && tc->delivered > tc->app_limited)
620 if (tc->sack_sb.last_sacked_bytes)
627 rs->
last_lost = tc->sack_sb.last_lost_bytes;
636 u32 *samples = 0, *
si;
686 s =
format (s,
"[%u, %u] d %u dt %.3f txt %.3f ftxt %.3f flags 0x%x",
static void bt_update_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts, u32 seq)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
u32 min_seq
Min seq number in sample.
static tcp_bt_sample_t * bt_fix_overlapped(tcp_byte_tracker_t *bt, tcp_bt_sample_t *start, u32 seq, u8 is_end)
int tcp_bt_is_sane(tcp_byte_tracker_t *bt)
Check if the byte tracker is in sane state.
#define seq_geq(_s1, _s2)
static rb_node_t * rb_node(rb_tree_t *rt, rb_node_index_t ri)
rb_tree_t sample_lookup
Rbtree for sample lookup by min_seq.
f64 tx_time
Transmit time for the burst.
nat44_ei_hairpin_src_next_t next_index
static tcp_bt_sample_t * bt_split_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts, u32 seq)
static rb_node_t * rb_node_left(rb_tree_t *rt, rb_node_t *n)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u64 prior_delivered
Delivered of sample used for rate, i.e., total bytes delivered at prior_time.
static void clib_mem_free(void *p)
struct _tcp_connection tcp_connection_t
void tcp_bt_sample_delivery_rate(tcp_connection_t *tc, tcp_rate_sample_t *rs)
Generate a delivery rate sample from recently acked bytes.
tcp_bts_flags_t flags
Rate sample flags from bt sample.
static void bt_free_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts)
static void tcp_bt_walk_samples(tcp_connection_t *tc, tcp_rate_sample_t *rs)
u8 * format_tcp_bt_sample(u8 *s, va_list *args)
static tcp_bt_sample_t * bt_get_sample(tcp_byte_tracker_t *bt, u32 bts_index)
tcp_bts_flags_t flags
Sample flag.
#define pool_put(P, E)
Free an object E in pool P.
u8 * format_tcp_bt(u8 *s, va_list *args)
static tcp_bt_sample_t * bt_lookup_seq(tcp_byte_tracker_t *bt, u32 seq)
static tcp_bt_sample_t * bt_alloc_sample(tcp_byte_tracker_t *bt, u32 min_seq, u32 max_seq)
u32 lost
Number of bytes lost over interval.
void tcp_bt_cleanup(tcp_connection_t *tc)
Byte tracker cleanup.
f64 prior_time
Delivered time of sample used for rate.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
__clib_export void rb_tree_del_custom(rb_tree_t *rt, u32 key, rb_tree_lt_fn ltfn)
u32 next
Next sample index in list.
u32 tail
Tail of samples linked list.
#define pool_foreach(VAR, POOL)
Iterate through pool.
u32 last_ooo
Cached last ooo sample.
#define seq_leq(_s1, _s2)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
uword opaque
value stored by node
u64 tx_lost
Lost at tx time.
static void tcp_bt_sample_to_rate_sample(tcp_connection_t *tc, tcp_bt_sample_t *bts, tcp_rate_sample_t *rs)
__clib_export rb_node_t * rb_tree_predecessor(rb_tree_t *rt, rb_node_t *x)
f64 end
end of the time range
static tcp_bt_sample_t * bt_prev_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts)
void tcp_bt_init(tcp_connection_t *tc)
Byte tracker initialize.
f64 interval_time
Time to ack the bytes delivered.
u64 tx_in_flight
In flight at tx time.
static u32 transport_max_tx_dequeue(transport_connection_t *tc)
u32 max_seq
Max seq number.
u32 prev
Previous sample index in list.
void tcp_bt_track_tx(tcp_connection_t *tc, u32 len)
Track a tcp tx burst.
sll srl srl sll sra u16x4 i
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
u32 delivered
Bytes delivered in interval_time.
struct _sack_block sack_block_t
enum tcp_bts_flags_ tcp_bts_flags_t
static f64 tcp_time_now_us(u32 thread_index)
#define TCP_BTS_INVALID_INDEX
#define vec_free(V)
Free vector's memory (no header).
void tcp_bt_track_rxt(tcp_connection_t *tc, u32 start, u32 end)
Track a tcp retransmission.
description fragment has unexpected format
__clib_export void rb_tree_init(rb_tree_t *rt)
__clib_export rb_node_index_t rb_tree_add_custom(rb_tree_t *rt, u32 key, uword opaque, rb_tree_lt_fn ltfn)
f64 first_tx_time
Connection first tx time at tx.
#define vec_foreach(var, vec)
Vector iterator.
f64 rtt_time
RTT for sample.
f64 delivered_time
Delivered time when sample taken.
u32 last_lost
Bytes lost now.
static tcp_bt_sample_t * bt_merge_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *prev, tcp_bt_sample_t *cur)
static u32 bt_sample_index(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts)
static uword pool_elts(void *v)
Number of active elements in a pool.
u64 tx_lost
Lost over interval.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static int bt_seq_lt(u32 a, u32 b)
static void tcp_bt_walk_samples_ooo(tcp_connection_t *tc, tcp_rate_sample_t *rs)
void tcp_bt_check_app_limited(tcp_connection_t *tc)
Check if sample to be generated is app limited.
static u32 tcp_flight_size(const tcp_connection_t *tc)
Our estimate of the number of bytes in flight (pipe size)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
vnet_interface_output_runtime_t * rt
__clib_export void rb_tree_free_nodes(rb_tree_t *rt)
rb_node_t * nodes
pool of nodes
static tcp_bt_sample_t * bt_next_sample(tcp_byte_tracker_t *bt, tcp_bt_sample_t *bts)
#define pool_free(p)
Free a pool.
static rb_node_t * rb_node_right(rb_tree_t *rt, rb_node_t *n)
void tcp_bt_flush_samples(tcp_connection_t *tc)
Flush byte tracker samples.
#define clib_warning(format, args...)
u32 head
Head of samples linked list.
u32 acked_and_sacked
Bytes acked + sacked now.
u64 tx_in_flight
In flight at (re)transmit time.
static void * clib_mem_alloc(uword size)
static u8 rb_node_is_tnil(rb_tree_t *rt, rb_node_t *n)
u64 delivered
Total delivered bytes for sample.
tcp_bt_sample_t * samples
Pool of samples.
static tcp_bt_sample_t * tcp_bt_alloc_tx_sample(tcp_connection_t *tc, u32 min_seq, u32 max_seq)