lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP_WINDOW_SIZE Limit


From: Rishi Khan
Subject: Re: [lwip-users] TCP_WINDOW_SIZE Limit
Date: Fri, 17 Oct 2008 10:26:31 -0400

Maybe I'm not understanding this write, but SO_SNDBUF is not implemented in the sockets.c library of lwIP. The window size is set in lwipopts.h as TCP_WND for the recv window and TCP_SND_BUF for the send window.

You may want to look into my window size rescaling patch:
http://savannah.nongnu.org/patch/?6537

On Oct 17, 2008, at 10:15 AM, Gary Olson wrote:

Hi,

I have been trying to increase my bandwidth by increasing the TCP_WINDOW_SIZE on the PC. I have already increased the TCP_WINDOW on LWIP.

I changed the TCP_WINDOW_SIZE to a much higher level in the Regedit TCP Parameters area to a very large value of 131400. However,

The actual window size is controlled in the following code snippet in my MSVC C++ Program shown here:





      //buffsize = 25000;  Failed

        // now will try to increase packet size put here at 20000.

buffsize = 20000; // this does not increase speed I think works .49 seconds for this test.

//buffsize = 8195; // since no real increase in speed I put at here.





result = setsockopt(m_socket[i], SOL_SOCKET, SO_SNDBUF, ( char * ) &buffsize, sizeof(buffsize));

      if ( result != SOCKET_ERROR )

      {

printf("PASSED socketopt i = %d /t %d decimal\n", i, buffsize);

      }

      else

      {

         printf("Error setting send RecvBuf /t i = %d  \n");

      }

What I find is that when I gradually increase my TCP_WINDOW_SIZE the SO_SNDBUF value from 8195 to 25000 I start failing at 25000. It passed at 20000.



So I thought I would try changing some of the Parameters related to TCP buffers. I added these lines below to my MSS file that change the LWIP Settings:





BEGIN LIBRARY

 PARAMETER LIBRARY_NAME = lwip

 PARAMETER LIBRARY_VER = 3.00.a

 PARAMETER PROC_INSTANCE = microblaze_0

 PARAMETER tcp_mss = 8560

 PARAMETER mem_size = 1000000

 PARAMETER pbuf_pool_bufsize = 8600

 PARAMETER tcp_wnd = 60000

 PARAMETER tcp_snd_buf = 40000

 PARAMETER tcp_tx_checksum_offload = true

 PARAMETER tcp_rx_checksum_offload = true

 PARAMETER udp_ttl = 255

 PARAMETER ip_default_ttl = 255

 PARAMETER memp_n_tcp_seg = 512

 PARAMETER memp_n_pbuf = 32

 PARAMETER pbuf_pool_size = 512

 PARAMETER memp_n_tcp_pcb = 64

END



This did not help however. It still works when at 20000 but at 25000 it fails. Is there anything that can be changed in LWIP

That may be able to increase my window size on the PC. Or maybe it has to do with the Xilinx LLTEMAC hardware. The size of the

Memory on the Receive and transmit is 8192. I can not increase it any more in this design.



Thank You,

  Gary Olson



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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