Netdev List
 help / color / mirror / Atom feed
* [PATCH] fix unlikely usage in tcp_transmit_skb()
@ 2006-04-26 16:50 Hua Zhong
  2006-04-28 22:25 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Hua Zhong @ 2006-04-26 16:50 UTC (permalink / raw)
  To: davem; +Cc: netdev

[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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-28 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26 16:50 [PATCH] fix unlikely usage in tcp_transmit_skb() Hua Zhong
2006-04-28 22:25 ` David S. Miller
2006-04-28 23:45   ` Alexey Toptygin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox