static int insert_block(struct scoreboard *scb,
const struct raw_sackblock *raw_sb, boolean_t *update);
static void update_lostseq(struct scoreboard *scb, tcp_seq snd_una,
- u_int maxseg);
+ u_int maxseg, int rxtthresh);
static MALLOC_DEFINE(M_SACKBLOCK, "sblk", "sackblock struct");
tcp_sack_ack_blocks(scb, tp->snd_una);
tcp_sack_add_blocks(tp, to);
- update_lostseq(scb, tp->snd_una, tp->t_maxseg);
+ update_lostseq(scb, tp->snd_una, tp->t_maxseg, tp->t_rxtthresh);
if (SEQ_LT(tp->rexmt_high, tp->snd_una)) {
tp->rexmt_high = tp->snd_una;
rexmt_high_update = 1;
* Optimization to quickly determine which packets are lost.
*/
static void
-update_lostseq(struct scoreboard *scb, tcp_seq snd_una, u_int maxseg)
+update_lostseq(struct scoreboard *scb, tcp_seq snd_una, u_int maxseg,
+ int rxtthresh)
{
struct sackblock *sb;
int nsackblocks = 0;
while (sb != NULL) {
++nsackblocks;
bytes_sacked += sb->sblk_end - sb->sblk_start;
- if (nsackblocks == tcprexmtthresh ||
- bytes_sacked >= tcprexmtthresh * maxseg) {
+ if (nsackblocks == rxtthresh ||
+ bytes_sacked >= rxtthresh * maxseg) {
scb->lostseq = sb->sblk_start;
return;
}
bzero(tp, sizeof(struct tcpcb));
LIST_INIT(&tp->t_segq);
tp->t_maxseg = tp->t_maxopd = isipv6 ? tcp_v6mssdflt : tcp_mssdflt;
+ tp->t_rxtthresh = tcprexmtthresh;
/* Set up our timeouts. */
tp->tt_rexmt = &it->inp_tp_rexmt;
struct tcpcb {
struct tsegqe_head t_segq;
int t_dupacks; /* consecutive dup acks recd */
+ int t_rxtthresh; /* # dup acks to start fast rxt */
int tt_cpu; /* sanity check the cpu */
struct tcp_callout *tt_rexmt; /* retransmit timer */