mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
net:Support jumbo frame prealloc the iob for the ICMP/UDP/TCP.
For the ICMP, UDP and TCP, pre-alloc an iob for a jumbo frame. Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
45fc68e904
commit
05b101134a
+10
-1
@@ -235,7 +235,11 @@ FAR struct udp_wrbuffer_s *udp_wrbuffer_timedalloc(unsigned int timeout)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_JUMBO_FRAME
|
||||
FAR struct udp_wrbuffer_s *udp_wrbuffer_tryalloc(int len)
|
||||
#else
|
||||
FAR struct udp_wrbuffer_s *udp_wrbuffer_tryalloc(void)
|
||||
#endif
|
||||
{
|
||||
FAR struct udp_wrbuffer_s *wrb;
|
||||
|
||||
@@ -262,7 +266,12 @@ FAR struct udp_wrbuffer_s *udp_wrbuffer_tryalloc(void)
|
||||
|
||||
/* Now get the first I/O buffer for the write buffer structure */
|
||||
|
||||
wrb->wb_iob = iob_tryalloc(false);
|
||||
wrb->wb_iob =
|
||||
#ifdef CONFIG_NET_JUMBO_FRAME
|
||||
iob_alloc_dynamic(len);
|
||||
#else
|
||||
iob_tryalloc(false);
|
||||
#endif
|
||||
if (!wrb->wb_iob)
|
||||
{
|
||||
nerr("ERROR: Failed to allocate I/O buffer\n");
|
||||
|
||||
Reference in New Issue
Block a user