16 #ifndef SRC_VNET_TCP_TCP_SACK_H_ 17 #define SRC_VNET_TCP_TCP_SACK_H_ 25 return hole - sb->holes;
31 return hole->end - hole->start;
74 #if TCP_SCOREBOARD_TRACE 75 #define tcp_scoreboard_trace_add(_tc, _ack) \ 77 static u64 _group = 0; \ 78 sack_scoreboard_t *_sb = &_tc->sack_sb; \ 79 sack_block_t *_sack, *_sacks; \ 80 scoreboard_trace_elt_t *_elt; \ 83 _sacks = _tc->rcv_opts.sacks; \ 84 for (i = 0; i < vec_len (_sacks); i++) \ 87 vec_add2 (_sb->trace, _elt, 1); \ 88 _elt->start = _sack->start; \ 89 _elt->end = _sack->end; \ 90 _elt->ack = _elt->end == _ack ? _ack : 0; \ 91 _elt->snd_una_max = _elt->end == _ack ? _tc->snd_una_max : 0; \ 92 _elt->group = _group; \ 96 #define tcp_scoreboard_trace_add(_tc, _ack) 101 start,
u8 have_sent_1_smss,
void tcp_update_sack_list(tcp_connection_t *tc, u32 start, u32 end)
Build SACK list as per RFC2018.
static u32 scoreboard_hole_bytes(sack_scoreboard_hole_t *hole)
#define TCP_INVALID_SACK_HOLE_INDEX
static sack_scoreboard_hole_t * scoreboard_get_hole(sack_scoreboard_t *sb, u32 index)
struct _tcp_connection tcp_connection_t
u8 tcp_scoreboard_is_sane_post_recovery(tcp_connection_t *tc)
Test that scoreboard is sane after recovery.
struct _sack_scoreboard sack_scoreboard_t
format_function_t format_tcp_scoreboard
static sack_scoreboard_hole_t * scoreboard_first_hole(sack_scoreboard_t *sb)
static sack_scoreboard_hole_t * scoreboard_prev_hole(sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
static sack_scoreboard_hole_t * scoreboard_next_hole(sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
sack_scoreboard_hole_t * scoreboard_next_rxt_hole(sack_scoreboard_t *sb, sack_scoreboard_hole_t *start, u8 have_sent_1_smss, u8 *can_rescue, u8 *snd_limited)
Figure out the next hole to retransmit.
static u32 scoreboard_hole_index(sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
void scoreboard_clear(sack_scoreboard_t *sb)
static sack_scoreboard_hole_t * scoreboard_last_hole(sack_scoreboard_t *sb)
void tcp_rcv_sacks(tcp_connection_t *tc, u32 ack)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
void scoreboard_init_rxt(sack_scoreboard_t *sb, u32 snd_una)
u8 * tcp_scoreboard_replay(u8 *s, tcp_connection_t *tc, u8 verbose)
struct _sack_scoreboard_hole sack_scoreboard_hole_t
void scoreboard_clear_reneging(sack_scoreboard_t *sb, u32 start, u32 end)
void scoreboard_init(sack_scoreboard_t *sb)
u32 tcp_sack_list_bytes(tcp_connection_t *tc)
f64 end
end of the time range