* [PATCH] sctp: do not update a_rwnd if we are not issuing a sack
@ 2016-03-18 21:39 Marcelo Ricardo Leitner
2016-03-20 20:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-03-18 21:39 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, Vlad Yasevich, linux-sctp
The SACK can be lost pretty much elsewhere, but if its allocation fail,
we know we are not sending it, so it is better to revert a_rwnd to its
previous value as this may give it a chance to issue a window update
later.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
net/sctp/sm_sideeffect.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 3c22c41a2bc2dc128d651f64b1a81036be22b9b3..7fe56d0acabf66cfd8fe29dfdb45f7620b470ac7 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -215,10 +215,14 @@ static int sctp_gen_sack(struct sctp_association *asoc, int force,
sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
SCTP_TO(SCTP_EVENT_TIMEOUT_SACK));
} else {
+ __u32 old_a_rwnd = asoc->a_rwnd;
+
asoc->a_rwnd = asoc->rwnd;
sack = sctp_make_sack(asoc);
- if (!sack)
+ if (!sack) {
+ asoc->a_rwnd = old_a_rwnd;
goto nomem;
+ }
asoc->peer.sack_needed = 0;
asoc->peer.sack_cnt = 0;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sctp: do not update a_rwnd if we are not issuing a sack
2016-03-18 21:39 [PATCH] sctp: do not update a_rwnd if we are not issuing a sack Marcelo Ricardo Leitner
@ 2016-03-20 20:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-20 20:31 UTC (permalink / raw)
To: marcelo.leitner; +Cc: netdev, nhorman, vyasevich, linux-sctp
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Fri, 18 Mar 2016 18:39:18 -0300
> The SACK can be lost pretty much elsewhere, but if its allocation fail,
> we know we are not sending it, so it is better to revert a_rwnd to its
> previous value as this may give it a chance to issue a window update
> later.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-20 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18 21:39 [PATCH] sctp: do not update a_rwnd if we are not issuing a sack Marcelo Ricardo Leitner
2016-03-20 20:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).