aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/outqueue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
commitd7fc02c7bae7b1cf69269992cf880a43a350cdaa (patch)
treea43d56fa72913a1cc98a0bbebe054d08581b3a7c /net/sctp/outqueue.c
parentee1262dbc65ce0b6234a915d8432171e8d77f518 (diff)
parent28b4d5cc17c20786848cdc07b7ea237a309776bb (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits) mac80211: fix reorder buffer release iwmc3200wifi: Enable wimax core through module parameter iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter iwmc3200wifi: Coex table command does not expect a response iwmc3200wifi: Update wiwi priority table iwlwifi: driver version track kernel version iwlwifi: indicate uCode type when fail dump error/event log iwl3945: remove duplicated event logging code b43: fix two warnings ipw2100: fix rebooting hang with driver loaded cfg80211: indent regulatory messages with spaces iwmc3200wifi: fix NULL pointer dereference in pmkid update mac80211: Fix TX status reporting for injected data frames ath9k: enable 2GHz band only if the device supports it airo: Fix integer overflow warning rt2x00: Fix padding bug on L2PAD devices. WE: Fix set events not propagated b43legacy: avoid PPC fault during resume b43: avoid PPC fault during resume tcp: fix a timewait refcnt race ... Fix up conflicts due to sysctl cleanups (dead sysctl_check code and CTL_UNNUMBERED removed) in kernel/sysctl_check.c net/ipv4/sysctl_net_ipv4.c net/ipv6/addrconf.c net/sctp/sysctl.c
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r--net/sctp/outqueue.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 23e5e97aa617..229690f02a1d 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -191,8 +191,8 @@ static inline int sctp_cacc_skip(struct sctp_transport *primary,
191 __u32 tsn) 191 __u32 tsn)
192{ 192{
193 if (primary->cacc.changeover_active && 193 if (primary->cacc.changeover_active &&
194 (sctp_cacc_skip_3_1(primary, transport, count_of_newacks) 194 (sctp_cacc_skip_3_1(primary, transport, count_of_newacks) ||
195 || sctp_cacc_skip_3_2(primary, tsn))) 195 sctp_cacc_skip_3_2(primary, tsn)))
196 return 1; 196 return 1;
197 return 0; 197 return 0;
198} 198}
@@ -921,6 +921,14 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
921 goto sctp_flush_out; 921 goto sctp_flush_out;
922 } 922 }
923 923
924 /* Apply Max.Burst limitation to the current transport in
925 * case it will be used for new data. We are going to
926 * rest it before we return, but we want to apply the limit
927 * to the currently queued data.
928 */
929 if (transport)
930 sctp_transport_burst_limited(transport);
931
924 /* Finally, transmit new packets. */ 932 /* Finally, transmit new packets. */
925 while ((chunk = sctp_outq_dequeue_data(q)) != NULL) { 933 while ((chunk = sctp_outq_dequeue_data(q)) != NULL) {
926 /* RFC 2960 6.5 Every DATA chunk MUST carry a valid 934 /* RFC 2960 6.5 Every DATA chunk MUST carry a valid
@@ -966,6 +974,10 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
966 packet = &transport->packet; 974 packet = &transport->packet;
967 sctp_packet_config(packet, vtag, 975 sctp_packet_config(packet, vtag,
968 asoc->peer.ecn_capable); 976 asoc->peer.ecn_capable);
977 /* We've switched transports, so apply the
978 * Burst limit to the new transport.
979 */
980 sctp_transport_burst_limited(transport);
969 } 981 }
970 982
971 SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ", 983 SCTP_DEBUG_PRINTK("sctp_outq_flush(%p, %p[%s]), ",
@@ -1001,6 +1013,13 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
1001 break; 1013 break;
1002 1014
1003 case SCTP_XMIT_OK: 1015 case SCTP_XMIT_OK:
1016 /* The sender is in the SHUTDOWN-PENDING state,
1017 * The sender MAY set the I-bit in the DATA
1018 * chunk header.
1019 */
1020 if (asoc->state == SCTP_STATE_SHUTDOWN_PENDING)
1021 chunk->chunk_hdr->flags |= SCTP_DATA_SACK_IMM;
1022
1004 break; 1023 break;
1005 1024
1006 default: 1025 default:
@@ -1053,6 +1072,9 @@ sctp_flush_out:
1053 packet = &t->packet; 1072 packet = &t->packet;
1054 if (!sctp_packet_empty(packet)) 1073 if (!sctp_packet_empty(packet))
1055 error = sctp_packet_transmit(packet); 1074 error = sctp_packet_transmit(packet);
1075
1076 /* Clear the burst limited state, if any */
1077 sctp_transport_burst_reset(t);
1056 } 1078 }
1057 1079
1058 return error; 1080 return error;