fjpanag commented on PR #7525: URL: https://github.com/apache/nuttx/pull/7525#issuecomment-1336430899
Here is another take on this issue. Not fully tested yet, may change a few things here and there. @xiaoxiang781216 > NET_TCP_PREALLOC_CONNS to indicate the preallocated conn from .bss/data or heap: zero disable the prealloation Done. For the moment BSS is used, I am not sure whether I will change this to use the heap. > NET_TCP_ALLOC_CONNS to indicate the dynamic conn from heap: > 0 mean disable dynamical allocation at all > 1 mean allocate/free from heap every time > 2... mean allocate batch from heap, but not return to heap Done. This way it satisfies everyone. > Add NET_TCP_MAX_CONNS to limit the concurrent opened connection, actually I think it's better to impose the limitation from psocket level instead individual protocol(e.g. TCP/UDP/ICMP). I left this in TCP level. I believe it is much better to be able to tune each protocol independently. Especially because each protocol has a different connection structure size, and different usage. For example the heap may have enough space for 50 UDP connections, but not for 50 TCP connections. > Finally, remove NET_ALLOC_CONNS once all conn convert to this style since we can achieve the same functionality by setting NET_xxx_ALLOC_CONNS to zero or non zero. Yes will do, in a future PR though. -- 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