lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #20287] tcp_output_nagle sends too early


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #20287] tcp_output_nagle sends too early
Date: Thu, 28 Jun 2007 10:40:42 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

URL:
  <http://savannah.nongnu.org/bugs/?20287>

                 Summary: tcp_output_nagle sends too early
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Donnerstag 28.06.2007 um 10:40
                Category: TCP
                Severity: 4 - Important
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: goldsimon
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Our implementation TCP nagle algorithm (tcp_output_nagle, previously included
in netconn_write/do_write), sends if pcb->snd_queuelen > 1.

The problem with that is that pcb->snd_queuelen is > 1 even if there is no
segment on the unsent queue but some segments are on the unacked queue. Also,
if a segment on the unsent queue consists of multiple pbufs, pcb->snd_queuelen
will be > 1. But the nagle algorithm should only send unsent data (if unacked
is empty) when there is a full segment to send.

I propose to change the condition ((tpcb)->snd_queuelen > 1) to
((tpcb)->unsent != NULL) && ((tpcb)->unsent->next != NULL) which means more
than one segment is unsent. Since we currently don't fill up every segment,
we would sent non-full segments, but that can't be changed (unless in a way
suggested in task #7040).

I'd like to hear opinions from others before changing this, maybe there is a
better solution?




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?20287>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]