netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: "Tomar, Nagendra" <nagendra_tomar@adaptec.com>
Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: BUG in tcp_timer.c:tcp_retransmit_timer()
Date: Mon, 29 Mar 2004 20:09:54 -0800	[thread overview]
Message-ID: <20040329200954.7baac255.davem@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0403290222190.27795-100000@localhost.localdomain>

On Mon, 29 Mar 2004 02:39:01 +0530 (IST)
Nagendra Singh Tomar <nagendra_tomar@adaptec.com> wrote:

> While reading the code of tcp_retransmit_timer(), I came across something 
> which looks liks a BUG.

It isn't, read below.

> The following line 
> 
> if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) > 0)
> 
> should correctly read as
> 
> if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) < 0)

Nope, it really does want greater than zero.  Less than zero
means memory allocation error or something like that, but this is
not what this code wants to check for.  Read the comment inside
this code block, it says it is the code path for "local congestion"
and the device output path indicates congestion via positive valued
error codes.

These codes are the NET_XMIT_* and NET_RX_* macros defined in
linux/netdevice.h

Thanks for the report though.

       reply	other threads:[~2004-03-30  4:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44.0403290222190.27795-100000@localhost.localdomain>
2004-03-30  4:09 ` David S. Miller [this message]
2004-03-29 17:24   ` BUG in tcp_timer.c:tcp_retransmit_timer() Nagendra Singh Tomar
2004-03-30  5:50     ` David S. Miller
2004-03-29 20:40       ` Nagendra Singh Tomar

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=20040329200954.7baac255.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=linux-net@vger.kernel.org \
    --cc=nagendra_tomar@adaptec.com \
    --cc=netdev@oss.sgi.com \
    /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).