cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pmosf
Visitor
Visitor
8,082 Views
Registered: ‎11-07-2007

LWIP v3.0: TCP retransmission

Hi Folks,
I've designed a board with a V4FX60 using xps_ll_temac_v1_00_b and LWIP v3.0 in raw api mode. The board acts as a server.
The design is implemented with ISE9.2 SP3 and EDK9.2 SP2.
It seems that the stack does not see a ACK from the computer because the stack makes TCP retransmission.

Here is the packet capture, the board has the 10.0.0.101 IP, the computer has the other one:

No. Time Source Destination Protocol Info
1 0.000000 10.0.0.100 10.0.0.101 TCP 1129 > 444 [SYN] Seq=0 Len=0 MSS=1460
2 0.000122 10.0.0.101 10.0.0.100 TCP 444 > 1129 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460
3 0.000035 10.0.0.100 10.0.0.101 TCP 1129 > 444 [ACK] Seq=1 Ack=1 Win=65535 Len=0
4 0.002166 10.0.0.100 10.0.0.101 TCP 1129 > 444 [PSH, ACK] Seq=1 Ack=1 Win=65535 Len=10
5 0.000145 10.0.0.101 10.0.0.100 TCP 444 > 1129 [ACK] Seq=1 Ack=11 Win=16376 Len=0
6 0.000021 10.0.0.101 10.0.0.100 TCP 444 > 1129 [PSH, ACK] Seq=1 Ack=11 Win=16376 Len=2
7 0.000023 10.0.0.101 10.0.0.100 TCP 444 > 1129 [PSH, ACK] Seq=3 Ack=11 Win=16376 Len=132
8 0.198507 10.0.0.100 10.0.0.101 TCP 1129 > 444 [ACK] Seq=11 Ack=3 Win=65533 Len=0
9 1.565497 10.0.0.101 10.0.0.100 TCP [TCP Retransmission] 444 > 1129 [PSH, ACK] Seq=3 Ack=11 Win=16376 Len=132
10 3.237329 10.0.0.100 10.0.0.101 TCP 1129 > 444 [FIN, ACK] Seq=11 Ack=3 Win=65533 Len=0
11 0.000140 10.0.0.101 10.0.0.100 TCP 444 > 1129 [FIN, ACK] Seq=135 Ack=12 Win=16375 Len=0
12 0.000029 10.0.0.100 10.0.0.101 TCP [TCP Dup ACK 10#1] 1129 > 444 [ACK] Seq=12 Ack=3 Win=65533 Len=0
13 3.762476 10.0.0.101 10.0.0.100 TCP [TCP Retransmission] 444 > 1129 [PSH, ACK] Seq=3 Ack=12 Win=16375 Len=132

I guess there is a problem with packets 7 and 8.

EDK mhs file section for TEMAC (used with MPMC3):

BEGIN xps_ll_temac
PARAMETER INSTANCE = TEMAC
PARAMETER HW_VER = 1.00.b
PARAMETER C_TEMAC0_TXCSUM = 1
PARAMETER C_TEMAC0_RXCSUM = 1
PARAMETER C_BASEADDR = 0x81c00000
PARAMETER C_HIGHADDR = 0x81c0ffff
PARAMETER C_BUS2CORE_CLK_RATIO = 1
PARAMETER C_INCLUDE_IO = 0
PARAMETER C_TEMAC0_TXFIFO = 32768
PARAMETER C_TEMAC0_RXFIFO = 32768
BUS_INTERFACE SPLB = plb
BUS_INTERFACE LLINK0 = xps_ll_temac_0_llink0
PORT TemacIntc0_Irpt = xps_ll_temac_0_TemacIntc0_Irpt
PORT MDIO_0 = temac_MDIO
PORT MDC_0 = temac_MDC
PORT GTX_CLK_0 = temac_GTX_CLK
PORT MII_TX_CLK_0 = temac_MII_TX_CLK
PORT GMII_TXD_0 = temac_GMII_TXD
PORT GMII_TX_EN_0 = temac_GMII_TX_EN
PORT GMII_TX_ER_0 = temac_GMII_TX_ER
PORT GMII_TX_CLK_0 = temac_GMII_TX_CLK
PORT GMII_RXD_0 = temac_GMII_RXD
PORT GMII_RX_DV_0 = temac_GMII_RX_DV
PORT GMII_RX_ER_0 = temac_GMII_RX_ER
PORT GMII_RX_CLK_0 = temac_GMII_RX_CLK
PORT REFCLK = clk_200m
PORT LlinkTemac0_CLK = sys_clk_s
PORT DCLK = clk50m
END

and finally, the lwipopts.h file:

#define SYS_LIGHTWEIGHT_PROT 1
#define NO_SYS 1

#define MEM_ALIGNMENT 8
#define MEM_SIZE 1024*1024
#define MEMP_NUM_PBUF 512
#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB 32
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_TCP_SEG 256
#define MEM_LIBC_MALLOC 1

#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 512
#define PBUF_POOL_BUFSIZE 1600
#define PBUF_LINK_HLEN 16

#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1

#define ICMP_TTL 255

#define IP_OPTIONS 0
#define IP_FORWARD 0
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define IP_REASS_BUFSIZE 5760
#define IP_FRAG_MAX_MTU 1500
#define IP_DEFAULT_TTL 255

#define LWIP_UDP 1
#define UDP_TTL 255

#define LWIP_TCP 1
#define TCP_SND_QUEUELEN 16 * TCP_SND_BUF/TCP_MSS
#define TCP_MSS 1460
#define TCP_SND_BUF 32*1024
#define TCP_WND 16*1024
#define TCP_TTL 255
#define TCP_MAXRTX 12
#define TCP_SYNMAXRTX 4
#define TCP_QUEUE_OOSEQ 1
#define CHECKSUM_GEN_TCP 0
#define CHECKSUM_CHECK_TCP 0

#define LWIP_DHCP 0
#define DHCP_DOES_ARP_CHECK true

#define CONFIG_LINKSPEED_AUTODETECT 1

Thank's for your help.
Paul.

Message Edited by pmosf on 02-28-2008 09:00 AM
0 Kudos
0 Replies