Hello Sid, at first your post made me think of jumbo frames.
I think that the Ethernet peripheral of the Zynq supports jumbo frames, and I assume that your host can also be configured to support larger segments, also for TCP. Hopefully the LAN ( routers, switches ) will also recognise and support them.
In principle, FreeRTOS+TCP should also support them, it only means that MTU will increase.
But I think that jumbo frames would only give a very small performance gain.
I think that @RAc has a typo in his message: 1640 should be 1460. The normal maximum MTU is 1500 bytes. Minus the 40 bytes for IP/TCP headers, there are 1460 bytes left for the TCP payload.
And so: your data will be split up before sending, and concatenated when receiving. There is nothing wrong with that.
You can either go two ways:
- You call recv() twice, and make sure the received data ends up in a single memory block.
- You let the data in the driver until the full 2 KB is available.
If you are interested in method 2, you could look at either
But personally, I’d go for the simpler method 1.