lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #24212] Deadlocked tcp_retransmit due to exceeded pcb-


From: Oleg Tyshev
Subject: [lwip-devel] [bug #24212] Deadlocked tcp_retransmit due to exceeded pcb->cwnd
Date: Mon, 22 Sep 2008 16:57:18 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)

Follow-up Comment #3, bug #24212 (project lwip):

In time I tested fastretransmit I had the same problem with unordered
queues.
Instead of tcp_reorder_segments() in my modified implementation 
I have used insert fragment in rite place.
1)=================
void
tcp_rexmit(struct tcp_pcb *pcb)
{
  if (pcb->unacked == NULL) {
    return;
  }

  /* Move the first unacked segment to the unsent queue */
  /* keep unsent queue sorted */
  struct tcp_seg* seg_to_move = pcb->unacked;
  pcb->unacked = seg_to_move->next;

  struct tcp_seg** ppCurSeg = &(pcb->unsent);
  while (*ppCurSeg &&
         TCP_SEQ_LT(ntohl((*ppCurSeg)->tcphdr->seqno),
ntohl(seg_to_move->tcphdr->seqno))) {
    ppCurSeg = &( (*ppCurSeg)->mpNext );
  }
  seg_to_move->mpNext = (*ppCurSeg);
  (*ppCurSeg) = seg_to_move;
  
  pcb->snd_nxt = ntohl(pcb->unsent->tcphdr->seqno);
....

2)=================
in tcp_output()
............
        /* In the case of fast retransmit, the packet should not go to the
tail
         * of the unacked queue, but rather at the head. We need to check
for
         * this case. -STJ Jul 27, 2004 */
        if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno),
ntohl(useg->tcphdr->seqno))){
          /* add segment to head of unacked list */
          /* keep unacked queue sorted */
          struct tcp_seg* seg_to_move = seg;
          struct tcp_seg** ppCurSeg = &(pcb->unacked);
          while (*ppCurSeg &&
                 TCP_SEQ_LT(ntohl((*ppCurSeg)->tcphdr->seqno),
ntohl(seg_to_move->tcphdr->seqno))) {
            ppCurSeg = &( (*ppCurSeg)->next );
          }
          seg_to_move->next = (*ppCurSeg);
          (*ppCurSeg) = seg_to_move;
        } else {
.........

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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