diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-11-23 15:54:00 -0500 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-11-23 15:54:00 -0500 |
commit | 46d5a808558181e03a4760d2188cc9879445738a (patch) | |
tree | a51cc59d64042f61518d25ef4ecc71924f243084 /net/sctp/outqueue.c | |
parent | a5b03ad2143c5bc9ae76533e8321fe66258b4f35 (diff) |
sctp: Update max.burst implementation
Current implementation of max.burst ends up limiting new
data during cwnd decay period. The decay is happening becuase
the connection is idle and we are allowed to fill the congestion
window. The point of max.burst is to limit micro-bursts in response
to large acks. This still happens, as max.burst is still applied
to each transmit opportunity. It will also apply if a very large
send is made (greater then allowed by burst).
Tested-by: Florian Niederbacher <florian.niederbacher@student.uibk.ac.at>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 5732661c87d3..2f2377369e2b 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -931,6 +931,14 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
931 | goto sctp_flush_out; | 931 | goto sctp_flush_out; |
932 | } | 932 | } |
933 | 933 | ||
934 | /* Apply Max.Burst limitation to the current transport in | ||
935 | * case it will be used for new data. We are going to | ||
936 | * rest it before we return, but we want to apply the limit | ||
937 | * to the currently queued data. | ||
938 | */ | ||
939 | if (transport) | ||
940 | sctp_transport_burst_limited(transport); | ||
941 | |||
934 | /* Finally, transmit new packets. */ | 942 | /* Finally, transmit new packets. */ |
935 | while ((chunk = sctp_outq_dequeue_data(q)) != NULL) { | 943 | while ((chunk = sctp_outq_dequeue_data(q)) != NULL) { |
936 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid | 944 | /* RFC 2960 6.5 Every DATA chunk MUST carry a valid |
@@ -976,6 +984,10 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
976 | packet = &transport->packet; | 984 | packet = &transport->packet; |
977 | sctp_packet_config(packet, vtag, | 985 | sctp_packet_config(packet, vtag, |
978 | asoc->peer.ecn_capable); | 986 | asoc->peer.ecn_capable); |
987 | /* We've switched transports, so apply the | ||
988 | * Burst limit to the new transport. | ||
989 | */ | ||
990 | sctp_transport_burst_limited(transport); | ||
979 | } | 991 | } |
980 | 992 | ||
981 | SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ", | 993 | SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ", |
@@ -1070,6 +1082,9 @@ sctp_flush_out: | |||
1070 | packet = &t->packet; | 1082 | packet = &t->packet; |
1071 | if (!sctp_packet_empty(packet)) | 1083 | if (!sctp_packet_empty(packet)) |
1072 | error = sctp_packet_transmit(packet); | 1084 | error = sctp_packet_transmit(packet); |
1085 | |||
1086 | /* Clear the burst limited state, if any */ | ||
1087 | sctp_transport_burst_reset(t); | ||
1073 | } | 1088 | } |
1074 | 1089 | ||
1075 | return error; | 1090 | return error; |