Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Hmm, lets see: TCP_MSS = 1460 PBUF_LINK_HLEN = 14 ETH_PAD_SIZE = 2 To sum up: 1460+40+14+2 = 1516 Seems like no problems here? --- Quote End --- Lets see again :) In the code DipSwitch posted on January 19th TCP_MSS is defined through the chain:
add_sw_setting decimal_number system_h_define memory.mem_size CONF_LWIP_MEM_SIZE 32768 "Size of the memory poll"# define MEM_SIZE CONF_LWIP_MEM_SIZE# define TCP_WND (MEM_SIZE / 8)# define TCP_MSS (TCP_WND / 4)
With all defaults TCP_MSS = 1024. In any case, I think you should agree, that “Ethernet frame length” is completely unrelated to “the size of the heap memory”, or “TCP Maximum segment size”, or “The size of a TCP window”. Mixing all this together misleading for user. For example, I spent last day debugging strange hangs in my code, which occurred irregularly after from 40 seconds to 1 hour of successful execution. That code doesn’t need much lwIP memory and doesn’t use TCP at all!