diff options
author | tuexen <tuexen@FreeBSD.org> | 2012-11-07 22:11:38 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2012-11-07 22:11:38 +0000 |
commit | 2e86daf6ac341d6133cfdfc77b6a2a4bf01172e5 (patch) | |
tree | 5fc728a115893eb242d7cb194eda516b9e5d30c0 /sys/netinet/sctp_input.c | |
parent | 79b7e755b41a4f7e2a36e4a7c6122f35fba258eb (diff) | |
download | FreeBSD-src-2e86daf6ac341d6133cfdfc77b6a2a4bf01172e5.zip FreeBSD-src-2e86daf6ac341d6133cfdfc77b6a2a4bf01172e5.tar.gz |
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
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r-- | sys/netinet/sctp_input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 2371ecb..d1a0ef6 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -311,6 +311,13 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) if (chk->rec.data.stream_number >= newcnt) { TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); asoc->send_queue_cnt--; + if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { + asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; +#ifdef INVARIANTS + } else { + panic("No chunks on the queues for sid %u.", chk->rec.data.stream_number); +#endif + } if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, |