-
Notifications
You must be signed in to change notification settings - Fork 1.5k
net: limit TCP and UDP send/recv buffer usage with throttled IOB #18011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
|
@zhhyu7 I just tried this commit and the one before but compared to NuttX 12.12 the network regressed competely where it's not working anymore on the NXP i.MXRT. |
|
Well in this case it is better to revert and investigate further. I can assist with more tests using IPERF over Wi-Fi. |
eth0 Link encap:Ethernet HWaddr 0a:0e:82:92:b3:7f at UP mtu 1504 @PetervdPerk-NXP It seems to be related to the network card not entering the RUNNING state, the protocol stack will check the RUNNING flag when selecting the sending network card. |
@fdcavalcanti Thanks, If the test reveals that the robustness of the network protocol stack is worse than before this PR was merged, we can first revert this commit, and I will also conduct more detailed analysis and testing. |
|
Yes it seems we have issues (tested on esp32c3-devkit:wifi). Ping is fine but IPERF speed drops and stays there. |
This for pointing this out indeed it's that RUNNING flag doesn't get active to make ethernet work. Adding However, with this PR my network is even locking up faster and ifconfig locks up as well. Unfortunely I can't debug this anymore because of the regresssion defined in #18109 |
@fdcavalcanti May I ask which network card driver is used, arch/risc-v/src/esp32c3-legacy/esp32c3_wlan.c? |
|
@zhhyu7 The wireless interfacing is done on
|
@fdcavalcanti If netdev_upperhalf is used, it should be fine. Can we see what the backtrace of each thread are when it gets stuck? |
|
@zhhyu7 I tried on the
Seems they crash at the same place. |
|
Here's the backtrace for C6: |
@fdcavalcanti Get, Will iperf return to normal if this patch is reverted? Then I'll revert this patch first, and after optimizing the implementation, I'll find several more devices locally for detailed verification before proceeding further. Thanks a lot. |
|
Yes, if I revert the commit IPERF is able to complete. |
#18113 this is the revert PR. I will subsequently conduct verification based on the above devices first. |
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.
Impact
tcp_recvwindow.c,tcp_send_buffered.cudp_wrbuffer.c,tcp_callback.c,udp_send_buffered.cicmp_input.c,icmpv6_input.cpkt_netpool.c,pkt_sendmsg_buffered.cTesting
sim:matter with very small amount of IOB configuration
NuttX test log: