Open imfatant opened 2 months ago
It indicates that more data is tried to be transmitted over Ethernet than the hardware is able to handle. It doesn't necessarily mean that you utilized full 100mbps because there is limited number of Tx buffers (10 by default). So, if the frames are short but you queue more than 10 at a time, you get this error. Printing the error message consumes additional HW resources and bandwidth is even worst.
There are the following steps to try:
1) Analyze your traffic and properly configure Tx buffers. For example, if your app utilize mostly short frames, decrease size of the buffer but increase the number of the buffers to keep app's memory footprint same. If you don't care, just increase number of TX buffers. You can do it in Kconfig.
2) Just for check, try to use master
version of IDF where insufficient TX buffer size
is not printed (only ESP_ERR_NO_MEM
is returned) to see if you get better performance.
You can also try to play with iperf
and configure different packet lengths and different bandwidth limit options to understand the behavior.
Should consider adding that to the docs, as it's a somewhat fairly common issue.
Should consider adding that to the docs, as it's a somewhat fairly common issue.
That's actually very good idea since this is really not the first question on this topic.
Answers checklist.
IDF version.
v5.2.2
Espressif SoC revision.
08:f9:e0:a7:9e:c8
Operating System used.
Windows to build the code. Ubuntu (native) to run YouTube.
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
cmd.exe
Development Kit.
WT32-ETH01 (i.e. ESP32)
Power Supply used.
External bench 3.3V supply.
What is the expected behavior?
Would it be reasonable to expect that the ESP32's RMII interface is capable of supporting a considerably higher bandwidth than its SPI host running at 33 MHz? Please correct me if I'm wrong.
So here's what's happening: When I'm watching a 1080p YouTube video stream on a laptop which is being supplied by an ESP32 using its RMII Ethernet + on-board LAN8720 chip (it's a WT32-ETH01 board) I'm getting considerable buffering, to the point that it's pretty much unwatchable. In addition to this, I'm getting repeated error messages over the serial port:
When I do the same, but now use an ESP32 with an external W5500 module over SPI running at 33 MHz, the video stream is dead smooth. And I get no insufficient TX buffer size error messages whatsoever.
I realise this issue has been raised before, both here (https://github.com/espressif/esp-idf/issues/13602) and here (https://esp32.com/viewtopic.php?t=24595) but could you please explain what might be going on?
What is the actual behavior?
See above (I have combined these two fields.)
Steps to reproduce.
Use the ESP-IDF v5.2.2 network/statoeth example.
Debug Logs.
More Information.
No response