svn commit: r242708 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed Nov 7 20:59:01 UTC 2012
Author: tuexen
Date: Wed Nov 7 20:59:00 2012
New Revision: 242708
URL: http://svnweb.freebsd.org/changeset/base/242708
Log:
Improve PR-SCTP if used in combination with NR-SACK.
Based on work done by Mohammad Rajiullah.
MFC after: 1 week
Modified:
head/sys/netinet/sctp_constants.h
head/sys/netinet/sctp_indata.c
Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h Wed Nov 7 20:03:45 2012 (r242707)
+++ head/sys/netinet/sctp_constants.h Wed Nov 7 20:59:00 2012 (r242708)
@@ -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
Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c Wed Nov 7 20:03:45 2012 (r242707)
+++ head/sys/netinet/sctp_indata.c Wed Nov 7 20:59:00 2012 (r242708)
@@ -2985,6 +2985,7 @@ sctp_process_segment_range(struct sctp_t
}
/* 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 s
}
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 s
* 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;
More information about the svn-src-all
mailing list