Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- The defaults are correct. If TCP_MSS is changed I could see it being a problem. I wouldn't think NIOS II systems are so memory constrained to not allow a large MSS. Although we were mulling here over making an lwIP-based program entirely in onchip memory. So I could see that being a case. Bill --- Quote End --- Bill, I agree that your defaults are consistent, but it is not obvious for the user that changing TCP_MSS also affects maximum allowable Ethernet frame size. More dangerous and hard-to-debug flaw is rx buffer overflow which may occur for small MAC core if PBUF_POOL_BUFSIZE < 1520. I see that setting TSEMAC_FRM_LENGTH to (PBUF_POOL_BUFSIZE+ETH_PAD_SIZE) in tse_mac_init() supposed to do the job, but this doesn’t work because “This maximum frame length is fixed to 1518 in 10/100 and 1000 Small MAC core variations.” So, it would be good for the driver to either ensure PBUF_POOL_BUFSIZE > 1520 in compile time, or to check that PBUF_POOL_BUFSIZE > TSEMAC_FRM_LENGTH in runtime and fail hard if this confition is not meat. Igor