From: Hua Zhong <hzhong@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] fix unlikely usage in tcp_transmit_skb()
Date: Wed, 26 Apr 2006 09:50:28 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604260947040.2907@localhost.localdomain> (raw)
[I hope this time it's OK - I'm sending from pine/Linux]
The following unlikely should be replaced by likely because the condition happens every time unless there is a hard error to transmit a packet.
Signed-off-by: Hua Zhong <hzhong@gmail.com>
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index a28ae59..743016b 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -465,7 +465,7 @@ #define SYSCTL_FLAG_SACK 0x4
TCP_INC_STATS(TCP_MIB_OUTSEGS);
err = icsk->icsk_af_ops->queue_xmit(skb, 0);
- if (unlikely(err <= 0))
+ if (likely(err <= 0))
return err;
tcp_enter_cwr(sk);
next reply other threads:[~2006-04-26 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 16:50 Hua Zhong [this message]
2006-04-28 22:25 ` [PATCH] fix unlikely usage in tcp_transmit_skb() David S. Miller
2006-04-28 23:45 ` Alexey Toptygin
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=Pine.LNX.4.64.0604260947040.2907@localhost.localdomain \
--to=hzhong@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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