haukepetersen commented on issue #477: npl/riot: reduce default 
MSYS_1_BLOCK_SIZE to minimum
URL: https://github.com/apache/mynewt-nimble/pull/477#issuecomment-508433856
 
 
   Slowly I start to see some light in the end of that tunnel :-)
   
   The 80 bytes minimum size for `MSYS_1_BLOCK_SIZE` makes sense and is now 
clear to me. I will adapt the value accordingly.
   
   However, I think the error handling in the NimBLE code could be vastly 
improved - having to actually now about these specifics from a user perspective 
is quite a lot to ask. And as for my experiences: when badly configuring 
buffers you end up with a silent fail, which is quite frustrating...
   
   > however there are few places in code which assume that complete PDU is 
available in first mbuf
   
   that is exactly one of those assumptions that is IMHO not handled very user 
friendly in case of bad configuration :-)
   
   > As for minimum number of blocks, I do not know what is the absolute 
minimum required [...]
   
   That does not sound good. For sure there can't the one general number that 
is valid for all the different possible transports etc, but for the specific 
use-case of running GATT over RAM transport using the NimBLE controller, I 
would think that there is value that can be stated. Not talking about degraded 
performance here (which is a tradeof a user has to chose), but a safe value 
that will at least not let the stack crash.
   
   > [...] but anyway I do not recommend to set this to such value since it can 
simply make things fail randomly.
   
   This comes pretty much to the core of the problems I was having: NimBLE has 
a tendency for random failures when it runs out of buffers. To me, this is 
unacceptable! I would rather expect NimBLE to (more or less silently) drop 
packets, or at least fail using assertions when in devel mode.
   
   For now I can live with simply setting this value to something I found 
reasonable in testing, but it does not feel right with without being able to 
justify exactly why this value is working and the value-1 is not...
   
   In general, I would very much like to see some improvements regarding the 
memory management: 
   - better documentation about how to configure the buffers for selected 
usecases (transports, protocols used, ...)
   - better error handling inside the host/controller when running out of 
buffers
   I will gladly help to do this as far as I can, but there are apparently a 
lot things that exceed my knowledge :-)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to