From 2e86daf6ac341d6133cfdfc77b6a2a4bf01172e5 Mon Sep 17 00:00:00 2001 From: tuexen Date: Wed, 7 Nov 2012 22:11:38 +0000 Subject: Add per outgoing stream accounting for chunks in the send and sent queue. This provides no functional change, but is a preparation for an upcoming stream reset improvement. Done with rrs@. MFC after: 1 week --- sys/netinet/sctp_timer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/netinet/sctp_timer.c') diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index d422350..fe7f754 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -440,6 +440,11 @@ sctp_recover_sent_list(struct sctp_tcb *stcb) if (SCTP_TSN_GE(asoc->last_acked_seq, chk->rec.data.TSN_seq)) { SCTP_PRINTF("Found chk:%p tsn:%x <= last_acked_seq:%x\n", (void *)chk, chk->rec.data.TSN_seq, asoc->last_acked_seq); + if (chk->sent != SCTP_DATAGRAM_NR_MARKED) { + if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { + asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; + } + } TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); if (chk->pr_sctp_on) { if (asoc->pr_sctp_cnt != 0) -- cgit v1.1