tcp: Add prr_out in preparation for PRR/nonSACK and LRD
Reviewed By: #transport, kbowling MFC after: 3 days Sponsored By: Netapp, Inc. Differential Revision: https://reviews.freebsd.org/D29058
This commit is contained in:
parent
fef8450971
commit
e53138694a
@ -510,6 +510,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
|
|||||||
}
|
}
|
||||||
/* XXXLAS: EXIT_RECOVERY ? */
|
/* XXXLAS: EXIT_RECOVERY ? */
|
||||||
tp->t_bytes_acked = 0;
|
tp->t_bytes_acked = 0;
|
||||||
|
tp->sackhint.prr_out = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2595,17 +2596,14 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
|||||||
imax(1, tp->snd_nxt - tp->snd_una);
|
imax(1, tp->snd_nxt - tp->snd_una);
|
||||||
snd_cnt = howmany((long)tp->sackhint.prr_delivered *
|
snd_cnt = howmany((long)tp->sackhint.prr_delivered *
|
||||||
tp->snd_ssthresh, tp->sackhint.recover_fs) -
|
tp->snd_ssthresh, tp->sackhint.recover_fs) -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out;
|
||||||
(tp->snd_nxt - tp->snd_recover));
|
|
||||||
} else {
|
} else {
|
||||||
if (V_tcp_do_prr_conservative)
|
if (V_tcp_do_prr_conservative)
|
||||||
limit = tp->sackhint.prr_delivered -
|
limit = tp->sackhint.prr_delivered -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out;
|
||||||
(tp->snd_nxt - tp->snd_recover));
|
|
||||||
else
|
else
|
||||||
limit = imax(tp->sackhint.prr_delivered -
|
limit = imax(tp->sackhint.prr_delivered -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out,
|
||||||
(tp->snd_nxt - tp->snd_recover)),
|
|
||||||
del_data) + maxseg;
|
del_data) + maxseg;
|
||||||
snd_cnt = imin(tp->snd_ssthresh - pipe, limit);
|
snd_cnt = imin(tp->snd_ssthresh - pipe, limit);
|
||||||
}
|
}
|
||||||
@ -3972,18 +3970,15 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th)
|
|||||||
imax(1, tp->snd_nxt - tp->snd_una);
|
imax(1, tp->snd_nxt - tp->snd_una);
|
||||||
snd_cnt = howmany((long)tp->sackhint.prr_delivered *
|
snd_cnt = howmany((long)tp->sackhint.prr_delivered *
|
||||||
tp->snd_ssthresh, tp->sackhint.recover_fs) -
|
tp->snd_ssthresh, tp->sackhint.recover_fs) -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out;
|
||||||
(tp->snd_nxt - tp->snd_recover));
|
|
||||||
} else {
|
} else {
|
||||||
if (V_tcp_do_prr_conservative)
|
if (V_tcp_do_prr_conservative)
|
||||||
limit = tp->sackhint.prr_delivered -
|
limit = tp->sackhint.prr_delivered -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out;
|
||||||
(tp->snd_nxt - tp->snd_recover));
|
|
||||||
else
|
else
|
||||||
limit = imax(tp->sackhint.prr_delivered -
|
limit = imax(tp->sackhint.prr_delivered -
|
||||||
(tp->sackhint.sack_bytes_rexmit +
|
tp->sackhint.prr_out, del_data) +
|
||||||
(tp->snd_nxt - tp->snd_recover)),
|
maxseg;
|
||||||
del_data) + maxseg;
|
|
||||||
snd_cnt = imin((tp->snd_ssthresh - pipe), limit);
|
snd_cnt = imin((tp->snd_ssthresh - pipe), limit);
|
||||||
}
|
}
|
||||||
snd_cnt = imax(snd_cnt, 0) / maxseg;
|
snd_cnt = imax(snd_cnt, 0) / maxseg;
|
||||||
|
@ -1236,6 +1236,14 @@ tcp_output(struct tcpcb *tp)
|
|||||||
p->rxmit += len;
|
p->rxmit += len;
|
||||||
tp->sackhint.sack_bytes_rexmit += len;
|
tp->sackhint.sack_bytes_rexmit += len;
|
||||||
}
|
}
|
||||||
|
if (IN_RECOVERY(tp->t_flags)) {
|
||||||
|
/*
|
||||||
|
* Account all bytes transmitted while
|
||||||
|
* IN_RECOVERY, simplifying PRR and
|
||||||
|
* Lost Retransmit Detection
|
||||||
|
*/
|
||||||
|
tp->sackhint.prr_out += len;
|
||||||
|
}
|
||||||
th->th_ack = htonl(tp->rcv_nxt);
|
th->th_ack = htonl(tp->rcv_nxt);
|
||||||
if (optlen) {
|
if (optlen) {
|
||||||
bcopy(opt, th + 1, optlen);
|
bcopy(opt, th + 1, optlen);
|
||||||
|
@ -115,7 +115,7 @@ struct sackhint {
|
|||||||
*/
|
*/
|
||||||
uint32_t recover_fs; /* Flight Size at the start of Loss recovery */
|
uint32_t recover_fs; /* Flight Size at the start of Loss recovery */
|
||||||
uint32_t prr_delivered; /* Total bytes delivered using PRR */
|
uint32_t prr_delivered; /* Total bytes delivered using PRR */
|
||||||
uint32_t _pad[1]; /* TBD */
|
uint32_t prr_out; /* Bytes sent during IN_RECOVERY */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq)
|
#define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq)
|
||||||
|
Loading…
Reference in New Issue
Block a user