net: limit TCP and UDP send/recv buffer usage with throttled IOB

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>
This commit is contained in:
zhanghongyu
2026-01-19 15:51:04 +08:00
committed by Xiang Xiao
parent a50737a75f
commit fa652f9c24
13 changed files with 25 additions and 47 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ FAR struct udp_wrbuffer_s *udp_wrbuffer_alloc(void)
/* Now get the first I/O buffer for the write buffer structure */
wrb->wb_iob = net_ioballoc(false);
wrb->wb_iob = net_ioballoc(true);
if (!wrb->wb_iob)
{
nerr("ERROR: Failed to allocate I/O buffer\n");
@@ -205,7 +205,7 @@ FAR struct udp_wrbuffer_s *udp_wrbuffer_tryalloc(void)
#ifdef CONFIG_NET_JUMBO_FRAME
iob_alloc_dynamic(len);
#else
iob_tryalloc(false);
iob_tryalloc(true);
#endif
if (!wrb->wb_iob)
{