net: limit TCP and UDP send/recv buffer usage with throttled IOB#18211
net: limit TCP and UDP send/recv buffer usage with throttled IOB#18211zhhyu7 wants to merge 1 commit into
Conversation
|
@fdcavalcanti Could you please help conduct a detailed test with this patch when you have time? It should be able to fix any known stuck issues, and by the way, you can also compare if there are any changes in throughput. Thanks a lot. |
|
I will run some tests on this patch, let's wait a few days before merging please. |
OK, thanks. |
|
Can you please fill out the impact section? |
Done. |
|
@zhhyu7 I have questions regarding this change. Bear in mind I'm not too familiar with the network stack. Those questions revolve around my tests using Espressif devices and WiFi.
If I take those values: |
The main content of this submission is to limit both the TX/RX buffers of TCP/UDP to throttled IOBs, avoiding impacts on the sending and receiving of control-type messages. and optimized TX for TCP buffered mode. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
@fdcavalcanti Get! The latest version has reverted a modification that might have caused the sent message to be too small, and the previous issue was caused by this reason. In the TCP sending process, if our CONFIG_NET_SEND_BUFSIZE is set to 0, we need to ensure that CONFIG_IOB_THROTTLE * CONFIG_IOB_BUFSIZE > TCP_MSS (or CONFIG_NET_ETH_PKTSIZE - 54), otherwise the protocol stack will freeze. |
|
@zhhyu7 thanks for the change. I have tested the following devices before and on this commit and got very similar throughput in each.
While some devices are very slow, it still connects and performs IPERF. Current issue noticed: |
Summary
The main content of this submission is to limit both the TX/RX buffers of TCP/UDP to throttled IOBs, avoiding impacts on the sending and receiving of control-type messages.
and optimized TX for TCP buffered mode.
Impact
Testing
sim:matter with very small amount of IOB configuration
NuttX test log:
esp32c3-devkit:wifi board
NuttX test log:
My local environment has a relatively high packet loss rate, so the throughput is relatively low.