You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/07/01 09:04:32 UTC

[GitHub] [mynewt-nimble] haukepetersen commented on issue #477: npl/riot: reduce default MSYS_1_BLOCK_SIZE to minimum

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-507181065
 
 
   @wes3 thanks for you feedback!
   
   Regarding my calculation: you are right about the access address, forgot about the nRFs easyDMA in-memory packet format... So taking this and the `struct ble_mbuf_hdr` into account, it should be:
   - 24 bytes mbuf overhead (sizeof(struct os_mbuf) + sizeof(struct os_mbuf_pkthdr))
   - 12 bytes `sizeof(struct ble_mbuf_hdr)`
   - 39 bytes packet payload (w/o access address and w/o crc)
   
   Sums up to `75 bytes` minimal viable buffer size, right?
   
   > You could also restrict the default number of msys blocks; that will definitely help.
   
   Of course. But the question here as well, what would be the minimal viable value here? 
   
   > Finally, if recollection serves, the 292 number comes from a maximum size PDU of 251 bytes using data length extension. I thought there was some documentation somewhere stating how that number was calculated. It certainly was not "random" :-) but without knowing exactly how it got calculated I could see how one would think that.
   
   The 'random' was of course meant very seriously :-)
   
    But I would be highly interested in the exact calculation that leads to this value, as between the max MTU of `251` and `292` there are still `41` bytes only partly accounted for.
   
   Since I work with NImBLE, the most trouble I had was related to buffer management, as NimBLE seems to be very sensitive about running out of them... So far, I simply generously over provision them, but this is of course only a temporary solution.
   
   My goal is to come up with some kind of elaborate documentation, that describes precisely how the buffers are used and how to adapt and configure them for ones specific use-case. I thought clarifying the above would be a good starting point :-)
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services