lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] what wrong with my tcp?


From: 乔崇
Subject: [lwip-users] what wrong with my tcp?
Date: Sat, 8 Nov 2003 8:48:49 +0800

dear Sir:
                My lwip send out tcp packets with tcp_write.After 30-40 packets 
sents out,it halt in the tcp_write.

        if (conn->type == NETCONN_TCP) {
      if (tcp_sndbuf(conn->pcb.tcp) == 0) {
  sys_sem_wait(conn->sem);
~~~~~~~~~~~~~~~~~~~~~~~~~halt here
  if (conn->err != ERR_OK) {
    goto ret;
  }
 It never return again.
 I turn on DBG,the lwip stack print all those message.

!tcp_bind: bind to port 21
tcp_bind: bind to port 23
tcp_bind: bind to port 1
tcp_bind: bind to port 11
tcp_connect to port 9999
tcp_enqueue(pcb=207dc, arg=0, len=0, flags=2, copy=0)
tcp_enqueue: queuelen: 0
tcp_enqueue: queueing 6509:6510 (0x2)
tcp_enqueue: 1 (after enqueued)
tcp_output: snd_wnd 8192, cwnd 1, wnd 1, effwnd 0, seq 6509, ack 6509
tcp_output: snd_wnd 8192, cwnd 1, wnd 1, effwnd 0, seq 6509, ack 6509, i0
tcp_output_segment: rtseq 6509
tcp_output_segment: 6509:6509
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags SYN ACK 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: SYN_SENT
SYN-SENT: ackno 6510 pcb->snd_nxt 6510 unacked 6509
tcp_process: SYN-SENT --queuelen 0
tcp_output: nothing to send (0)
tcp_output: snd_wnd 5840, cwnd 2048, wnd 2048, seg == NULL, ack 6510
State: ESTABLISHED
tcp_write(pcb=207dc, arg=11fbec, len=4095, copy=0)
tcp_enqueue(pcb=207dc, arg=11fbec, len=4095, flags=0, copy=0)
tcp_enqueue: queuelen: 0
tcp_enqueue: queueing 6510:7970 (0x0)
tcp_enqueue: queueing 7970:9430 (0x0)
tcp_enqueue: queueing 9430:10605 (0x0)
tcp_enqueue: 6 (after enqueued)
tcp_output: snd_wnd 5840, cwnd 2048, wnd 2048, effwnd 1460, seq 6510, ack 6510
tcp_output: snd_wnd 5840, cwnd 2048, wnd 2048, effwnd 1460, seq 6510, ack 6510, 
i0
tcp_output_segment: rtseq 6510
tcp_output_segment: 6510:7970
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK -+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: slow start cwnd 3508
tcp_receive: ACK for 7970, unacked->seqno 6510:7970
tcp_receive: removing 6510:7970 from pcb->unacked
tcp_receive: queuelen 6 ... 4 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 6510 ackno 7970
tcp_output: snd_wnd 8760, cwnd 3508, wnd 3508, effwnd 1460, seq 7970, ack 7970
tcp_output: snd_wnd 8760, cwnd 3508, wnd 3508, effwnd 1460, seq 7970, ack 7970, 
i0
tcp_output_segment: rtseq 7970
tcp_output_segment: 7970:9430
tcp_output: snd_wnd 8760, cwnd 3508, wnd 3508, effwnd 2635, seq 9430, ack 7970, 
i1
tcp_output_segment: rtseq 9430
tcp_output_segment: 9430:10605
State: ESTABLISHED
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK -+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: slow start cwnd 4968
tcp_receive: ACK for 9430, unacked->seqno 7970:9430
tcp_receive: removing 7970:9430 from pcb->unacked
tcp_receive: queuelen 4 ... 2 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 9430 ackno 9430
tcp_output: nothing to send (0)
tcp_output: snd_wnd 11680, cwnd 4968, wnd 4968, seg == NULL, ack 9430
State: ESTABLISHED
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK -+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: slow start cwnd 6428
tcp_receive: ACK for 10605, unacked->seqno 9430:10605
tcp_receive: removing 9430:10605 from pcb->unacked
tcp_receive: queuelen 2 ... 0 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 9430 ackno 10605
tcp_output: nothing to send (0)
tcp_output: snd_wnd 14600, cwnd 6428, wnd 6428, seg == NULL, ack 10605
State: ESTABLISHED
tcp_write(pcb=207dc, arg=120beb, len=1829, copy=0)
tcp_enqueue(pcb=207dc, arg=120beb, len=1829, flags=0, copy=0)
tcp_enqueue: queuelen: 0
tcp_enqueue: queueing 10605:12065 (0x0)
tcp_enqueue: queueing 12065:12434 (0x0)
tcp_enqueue: 4 (after enqueued)
tcp_output: snd_wnd 14600, cwnd 6428, wnd 6428, effwnd 1460, seq 10605, ack 
10605
tcp_output: snd_wnd 14600, cwnd 6428, wnd 6428, effwnd 1460, seq 10605, ack 
10605, i0
tcp_output_segment: rtseq 10605
tcp_output_segment: 10605:12065
tcp_output: snd_wnd 14600, cwnd 6428, wnd 6428, effwnd 1829, seq 12065, ack 
10605, i1
tcp_output_segment: rtseq 12065
tcp_output_segment: 12065:12434
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK -+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: slow start cwnd 7888
tcp_receive: ACK for 12065, unacked->seqno 10605:12065
tcp_receive: removing 10605:12065 from pcb->unacked
tcp_receive: queuelen 4 ... 2 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 12065 ackno 12065
tcp_output: nothing to send (0)
tcp_output: snd_wnd 17520, cwnd 7888, wnd 7888, seg == NULL, ack 12065
State: ESTABLISHED
tcp_write(pcb=207dc, arg=11fbec, len=1220, copy=0)
tcp_enqueue(pcb=207dc, arg=11fbec, len=1220, flags=0, copy=0)
tcp_enqueue: queuelen: 2
tcp_enqueue: queueing 12434:13654 (0x0)
tcp_enqueue: 4 (after enqueued)
tcp_write(pcb=207dc, arg=11fbec, len=1432, copy=0)
tcp_enqueue(pcb=207dc, arg=11fbec, len=1432, flags=0, copy=0)
tcp_enqueue: queuelen: 4
tcp_enqueue: queueing 13654:15086 (0x0)
tcp_enqueue: 6 (after enqueued)
tcp_write(pcb=207dc, arg=11fbec, len=772, copy=0)
tcp_enqueue(pcb=207dc, arg=11fbec, len=772, flags=0, copy=0)
tcp_enqueue: queuelen: 6
tcp_enqueue: queueing 15086:15858 (0x0)
tcp_enqueue: 8 (after enqueued)
tcp_write(pcb=207dc, arg=11fbec, len=302, copy=0)
tcp_enqueue(pcb=207dc, arg=11fbec, len=302, flags=0, copy=0)
tcp_enqueue: queuelen: 8
tcp_enqueue: queueing 15858:16160 (0x0)
tcp_enqueue: chaining, new len 1074
tcp_enqueue: 10 (after enqueued)
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags SYN -+-+-+-+-+-+-+-+-+-+-+-+-+-+
tcp_input: no PCB match found, resetting.
tcp_rst: seqno 0 ackno 3621246804.
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags SYN -+-+-+-+-+-+-+-+-+-+-+-+-+-+
tcp_input: no PCB match found, resetting.
tcp_rst: seqno 0 ackno 3621246804.
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags SYN -+-+-+-+-+-+-+-+-+-+-+-+-+-+
tcp_input: no PCB match found, resetting.
tcp_rst: seqno 0 ackno 3621246804.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~halt
then i close the linux end,lwip continue print messages as follow


-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags FIN ACK 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: slow start cwnd 9348
tcp_receive: ACK for 12434, unacked->seqno 12065:12434
tcp_receive: removing 12065:12434 from pcb->unacked
tcp_receive: queuelen 10 ... 8 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 12065 ackno 12434
tcp_receive: received FIN.tcp_output: snd_wnd 20440, cwnd 9348, wnd 9348, 
effwnd 1220, seq 12434, ack 12434
tcp_output: snd_wnd 20440, cwnd 9348, wnd 9348, effwnd 1220, seq 12434, ack 
12434, i0
tcp_output_segment: rtseq 12434
tcp_output_segment: 12434:13654
tcp_output: snd_wnd 20440, cwnd 9348, wnd 9348, effwnd 2652, seq 13654, ack 
12434, i1
tcp_output_segment: rtseq 13654
tcp_output_segment: 13654:15086
tcp_output: snd_wnd 20440, cwnd 9348, wnd 9348, effwnd 3726, seq 15086, ack 
12434, i2
tcp_output_segment: rtseq 15086
tcp_output_segment: 15086:16160
State: CLOSE_WAIT
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags RST -+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: CLOSE_WAIT
tcp_process: Connection RESET
tcp_pcb_purge
tcp_pcb_purge: data left on ->unacked
State: CLOSED
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags RST -+-+-+-+-+-+-+-+-+-+-+-+-+-+
tcp_input: no PCB match found, resetting.
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags RST -+-+-+-+-+-+-+-+-+-+-+-+-+-+
tcp_input: no PCB match found, resetting.

               qiaochong
address@hidden
          2003-11-08







reply via email to

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