[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #51925] Replace the OOSEQ max bytes and pbufs constant
From: |
Douglas |
Subject: |
[lwip-devel] [bug #51925] Replace the OOSEQ max bytes and pbufs constants with functions. |
Date: |
Tue, 5 Sep 2017 10:24:54 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #2, bug #51925 (project lwip):
Thank you for taking a look. Here is how this is being used, see the functions
ooseq_max_bytes() and ooseq_max_pbufs():
https://github.com/ourairquality/esp-open-rtos/blob/893f715852d1b831289056fc59903d3422d07611/lwip/esp_interface.c#L168
The current constant limit per pcb does not limit the total number of ooseq
buffers because there can be multiple pcbs. The esp8266 sdk has a hard limit,
a small pool, and if that is exhausted then that blocks further input. So this
change allows the number of ooseq buffers for a particular pcb to be limited.
It supports a greedy allocation strategy, allowing ooseq buffers to grow until
the limit is reached.
Similarly for memory usage, things turn ugly if memory is exhausted.
The pcb could be passed in as an alternative, and that would allow the callee
to optionally loop over the list to add up the current total number of buffers
and/or memory usage.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?51925>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/