fjpanag commented on code in PR #7525:
URL: https://github.com/apache/nuttx/pull/7525#discussion_r1111040512


##########
net/icmp/Kconfig:
##########
@@ -32,9 +32,45 @@ config NET_ICMP_SOCKET
 
 if NET_ICMP_SOCKET
 
-config NET_ICMP_NCONNS
-       int "Max ICMP packet sockets"
+config NET_ICMP_PREALLOC_CONNS
+       int "Preallocated ICMP packet sockets"
        default 4
+       ---help---
+               Number of ICMP connections (all tasks).
+               
+               This number of connections will be pre-allocated during system 
boot.
+               If dynamic connections allocation is enabled, more connections 
may
+               be allocated at a later time, as the system needs them. Else 
this
+               will be the maximum number of connections available to the 
system
+               at all times.
+
+               Set to 0 to disable (and rely only on dynamic allocations).
+
+config NET_ICMP_ALLOC_CONNS
+       int "Dynamic ICMP connections allocation"
+       default 0
+       ---help---
+               Dynamic memory allocations for ICMP.
+
+               When set to 0 all dynamic allocations are disabled.
+
+               When set to 1 a new connection will be allocated every time,
+               and it will be free'd when no longer needed.
+
+               Setting this to 2 or more will allocate the connections in
+               batches (with batch size equal to this config). When a
+               connection is no longer needed, it will be returned to the
+               free connections pool, and it will never be deallocated!
+
+config NET_ICMP_MAX_CONNS
+       int "Maximum number of ICMP connections"
+       default 0

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to