Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

LwIP Configuration problem

Altera_Forum
Honored Contributor II
1,328 Views

I follow the document " Using Lightweight IP with the NiosII Processor Tutorial " to optimize LwIP Throughput . 

 

On page B-2 , it suggest that the optimal value of TCP_WND is 32768 . (The original value of TCP_WND is 2048 ) 

 

The TCP_WND effect the Maximum window size ( receive buffer space in bytes ) . 

 

When I set the value of TCP_WND for 32768 , I can not receive total data that had been transmitted to my 1c20 board. 

 

How to solve this problem ? 

 

 

thanks a lot ~
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
354 Views

I'm afraid you need to give a lot more detail if anyone is going to be able to help you. The best first place to start is to get a packet log using something like ethereal.

0 Kudos
Altera_Forum
Honored Contributor II
354 Views

I use the simple socket server project which provided by NiosII IDE. 

 

I modify the sss_handle_receive( ) in simple_socket_server.c and use sss_handle_receive( ) to receive data which sent by PC. 

 

The sss_handle_receive( ) use the code as below to receive data . 

 

rx_code = recv(conn->fd, conn->rx_buffer, data_length , 0); 

 

For optimizing the LwIP Throughput , I use the NiosII IDE to set the value of TCP_WND . 

 

When I set the value of TCP_WND for 32768 , the data I obtained is smaller than data_length . 

 

But it is normal , if the value of TCP_WND is 2048 . 

 

How can I do to solve the problem ?  

 

thanks~
0 Kudos
Altera_Forum
Honored Contributor II
354 Views

To solve a problem like this, you need to look at the packets actually being sent on the network. You need to get a packet log using a tool such as ethereal to narrow down where the problem is.

0 Kudos
Altera_Forum
Honored Contributor II
354 Views

Dear rugbybloke 

 

thank you~  

 

I will try your suggestion .
0 Kudos
Altera_Forum
Honored Contributor II
354 Views

you can look tt_nios2_lwip_tutorial.pdf file in altera\kits\nios2\documents 

it is very helpful ! 

good luck to you !
0 Kudos
Reply