summaryrefslogtreecommitdiff
path: root/net/sctp/outqueue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 12:23:08 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 12:23:08 -0800
commit5d5dde2ed928677028ef859f48a32a503b01c636 (patch)
tree954eb70d7b8095de8e95f22c6b6759b55bc5edb4 /net/sctp/outqueue.c
parentdafdcfba62f7ef23045f024a305168cac1c07590 (diff)
parentaef8811abbc9249a2bd59bd2331bbe523df05d17 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits) [XFRM]: Fix oops in xfrm4_dst_destroy() [XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head [IPV4]: Use random32() in net/ipv4/multipath [BRIDGE]: eliminate workqueue for carrier check [BRIDGE]: get rid of miscdevice include [IPV6]: Fix __ipv6_addr_type() export in correct place. [IPV4] devinet: Register inetdev earlier. [IPV6] ADDRCONF: Register inet6_dev earlier. [IPV6] ADDRCONF: Manage prefix route corresponding to address manually added. [IPV6] IP6TUNNEL: Use update_pmtu() of dst on xmit. [IPV6] ADDRCONF: Statically link __ipv6_addr_type() for sunrpc subsystem. [IPV4]: Correct links in net/ipv4/Kconfig [SCTP]: Strike the transport before updating rto. [SCTP]: Fix connection hang/slowdown with PR-SCTP [TCP]: Fix MD5 signature pool locking. [TG3]: TSO workaround fixes. [AF_PACKET]: Remove unnecessary casts. [IPV6]: Adjust inet6_exit() cleanup sequence against inet6_init() [IPSEC]: More fix is needed for __xfrm6_bundle_create(). [IRDA] net/irda/: proper prototypes ...
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r--net/sctp/outqueue.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 5c2ddd10db06..41abfd17627e 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -396,6 +396,19 @@ void sctp_retransmit_mark(struct sctp_outq *q,
if (sctp_chunk_abandoned(chunk)) {
list_del_init(lchunk);
sctp_insert_list(&q->abandoned, lchunk);
+
+ /* If this chunk has not been previousely acked,
+ * stop considering it 'outstanding'. Our peer
+ * will most likely never see it since it will
+ * not be retransmitted
+ */
+ if (!chunk->tsn_gap_acked) {
+ chunk->transport->flight_size -=
+ sctp_data_size(chunk);
+ q->outstanding_bytes -= sctp_data_size(chunk);
+ q->asoc->peer.rwnd += (sctp_data_size(chunk) +
+ sizeof(struct sk_buff));
+ }
continue;
}
@@ -1244,6 +1257,15 @@ static void sctp_check_transmitted(struct sctp_outq *q,
if (sctp_chunk_abandoned(tchunk)) {
/* Move the chunk to abandoned list. */
sctp_insert_list(&q->abandoned, lchunk);
+
+ /* If this chunk has not been acked, stop
+ * considering it as 'outstanding'.
+ */
+ if (!tchunk->tsn_gap_acked) {
+ tchunk->transport->flight_size -=
+ sctp_data_size(tchunk);
+ q->outstanding_bytes -= sctp_data_size(tchunk);
+ }
continue;
}
@@ -1695,11 +1717,6 @@ static void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 ctsn)
*/
if (TSN_lte(tsn, ctsn)) {
list_del_init(lchunk);
- if (!chunk->tsn_gap_acked) {
- chunk->transport->flight_size -=
- sctp_data_size(chunk);
- q->outstanding_bytes -= sctp_data_size(chunk);
- }
sctp_chunk_free(chunk);
} else {
if (TSN_lte(tsn, asoc->adv_peer_ack_point+1)) {