Improve PR-SCTP if used in combination with NR-SACK.
Based on work done by Mohammad Rajiullah. MFC after: 1 week
This commit is contained in:
parent
38b2a8bd2d
commit
98f2956c11
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242708
@ -370,6 +370,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define SCTP_DATAGRAM_ACKED 10010
|
||||
#define SCTP_DATAGRAM_MARKED 20010
|
||||
#define SCTP_FORWARD_TSN_SKIP 30010
|
||||
#define SCTP_DATAGRAM_NR_MARKED 40010
|
||||
|
||||
/* chunk output send from locations */
|
||||
#define SCTP_OUTPUT_FROM_USR_SEND 0
|
||||
|
@ -2985,6 +2985,7 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
|
||||
}
|
||||
/* NR Sack code here */
|
||||
if (nr_sacking) {
|
||||
tp1->sent = SCTP_DATAGRAM_NR_MARKED;
|
||||
if (tp1->data) {
|
||||
/*
|
||||
* sa_ignore
|
||||
@ -3600,7 +3601,8 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb,
|
||||
}
|
||||
TAILQ_FOREACH_SAFE(tp1, &asoc->sent_queue, sctp_next, tp2) {
|
||||
if (tp1->sent != SCTP_FORWARD_TSN_SKIP &&
|
||||
tp1->sent != SCTP_DATAGRAM_RESEND) {
|
||||
tp1->sent != SCTP_DATAGRAM_RESEND &&
|
||||
tp1->sent != SCTP_DATAGRAM_NR_MARKED) {
|
||||
/* no chance to advance, out of here */
|
||||
break;
|
||||
}
|
||||
@ -3653,7 +3655,8 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb,
|
||||
* the chunk, advance our peer ack point and we can check
|
||||
* the next chunk.
|
||||
*/
|
||||
if (tp1->sent == SCTP_FORWARD_TSN_SKIP) {
|
||||
if ((tp1->sent == SCTP_FORWARD_TSN_SKIP) ||
|
||||
(tp1->sent == SCTP_DATAGRAM_NR_MARKED)) {
|
||||
/* advance PeerAckPoint goes forward */
|
||||
if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, asoc->advanced_peer_ack_point)) {
|
||||
asoc->advanced_peer_ack_point = tp1->rec.data.TSN_seq;
|
||||
|
Loading…
Reference in New Issue
Block a user