summaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statefuns.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-06-21 13:43:50 -0700
committerAuke-jan Kok <ahkok@gitlost.site>2006-06-21 13:43:50 -0700
commit0d204094d15dac2e8a439b993f71eda385b4dccd (patch)
tree647f0ddec94d0fb4aaf74fa55bcad75946030f8a /net/sctp/sm_statefuns.c
parenta487a8f7b6947f6445e5a1aa876522916785d5ec (diff)
parent612eff0e3715a6faff5ba1b74873b99e036c59fe (diff)
downloadkernel-crypto-0d204094d15dac2e8a439b993f71eda385b4dccd.tar.gz
kernel-crypto-0d204094d15dac2e8a439b993f71eda385b4dccd.tar.xz
kernel-crypto-0d204094d15dac2e8a439b993f71eda385b4dccd.zip
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r--net/sctp/sm_statefuns.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 8bc279219a7..9e58144f485 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -5293,10 +5293,18 @@ static int sctp_eat_data(const struct sctp_association *asoc,
* seems a bit troublesome in that frag_point varies based on
* PMTU. In cases, such as loopback, this might be a rather
* large spill over.
+ * NOTE: If we have a full receive buffer here, we only renege if
+ * our receiver can still make progress without the tsn being
+ * received. We do this because in the event that the associations
+ * receive queue is empty we are filling a leading gap, and since
+ * reneging moves the gap to the end of the tsn stream, we are likely
+ * to stall again very shortly. Avoiding the renege when we fill a
+ * leading gap is a good heuristic for avoiding such steady state
+ * stalls.
*/
if (!asoc->rwnd || asoc->rwnd_over ||
(datalen > asoc->rwnd + asoc->frag_point) ||
- rcvbuf_over) {
+ (rcvbuf_over && (!skb_queue_len(&sk->sk_receive_queue)))) {
/* If this is the next TSN, consider reneging to make
* room. Note: Playing nice with a confused sender. A