From: Sharath Chandra Vurukala <sharathv@codeaurora.org>
To: netdev@vger.kernel.org
Cc: chinagar@codeaurora.org, kapandey@codeaurora.org,
subashab@codeaurora.org
Subject: [PATCH] net: tcp: add correct check for tcp_retransmit_skb()
Date: Fri, 30 Nov 2018 23:58:38 +0530 [thread overview]
Message-ID: <20181130182828.GA27508@svurukal-linux.qualcomm.com> (raw)
when the tcp_retranmission_timer expires and tcp_retranmsit_skb is
called if the retranmsission fails due to local congestion,
backoff should not incremented.
tcp_retransmit_skb() returns non-zero negative value in some cases of
failure but the caller tcp_retransmission_timer() has a check for
failure which checks if the return value is greater than zero.
The check is corrected to check for non-zero value.
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
---
net/ipv4/tcp_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 091c5392..c19f371 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -511,7 +511,7 @@ void tcp_retransmit_timer(struct sock *sk)
tcp_enter_loss(sk);
- if (tcp_retransmit_skb(sk, tcp_rtx_queue_head(sk), 1) > 0) {
+ if (tcp_retransmit_skb(sk, tcp_rtx_queue_head(sk), 1) != 0) {
/* Retransmission failed because of local congestion,
* do not backoff.
*/
--
1.9.1
next reply other threads:[~2018-12-01 5:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 18:28 Sharath Chandra Vurukala [this message]
2018-11-30 18:40 ` [PATCH] net: tcp: add correct check for tcp_retransmit_skb() Eric Dumazet
2018-11-30 18:41 ` Yuchung Cheng
-- strict thread matches above, loose matches on Subject: below --
2018-11-26 9:35 Sharath Chandra Vurukala
2018-11-26 10:16 ` Joey Pabalinas
2018-11-28 0:15 ` David Miller
2018-11-28 0:29 ` Yuchung Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181130182828.GA27508@svurukal-linux.qualcomm.com \
--to=sharathv@codeaurora.org \
--cc=chinagar@codeaurora.org \
--cc=kapandey@codeaurora.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).