* [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
* Re: [PATCH] fix unlikely usage in tcp_transmit_skb()
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
0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2006-04-28 22:25 UTC (permalink / raw)
To: hzhong; +Cc: netdev
From: Hua Zhong <hzhong@gmail.com>
Date: Wed, 26 Apr 2006 09:50:28 -0700 (PDT)
> [I hope this time it's OK - I'm sending from pine/Linux]
It adds an extra space in the diff lines which corrupts
the patch.
I've applied this by hand, but please try to get something
which works before providing new patches. Just try to email
yourself a patch, then try to apply it successfully yourself.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix unlikely usage in tcp_transmit_skb()
2006-04-28 22:25 ` David S. Miller
@ 2006-04-28 23:45 ` Alexey Toptygin
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Toptygin @ 2006-04-28 23:45 UTC (permalink / raw)
To: David S. Miller; +Cc: hzhong, netdev
On Fri, 28 Apr 2006, David S. Miller wrote:
> From: Hua Zhong <hzhong@gmail.com>
> Date: Wed, 26 Apr 2006 09:50:28 -0700 (PDT)
>
>> [I hope this time it's OK - I'm sending from pine/Linux]
>
> It adds an extra space in the diff lines which corrupts
> the patch.
You can work around this by enabling quell-flowed-text - then pine will
never mangle patches. Currently (pine4.64), if you're disabling flowed
text on a per-message basis with ^V before sending, patches containing
trailing whitespace will get mangled. Pine labels the message as not
flowed, but does the mangling anyway :-/
Tooting my own horn here, but I submitted a pine patch this week which
fixes the issue. Hopefully, the next pine release will behave correctly.
You'll still have to remember to hit ^V before sending mail containing
patches, and you should always use ^R to include patch files, since
newlines in the input are treated magically. Or, you can enable
quell-flowed-text, and pretend the whole flowed text feature never
happened. I'll shut up about pine now :-)
Alexey
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.