You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by gi...@git.apache.org on 2017/06/08 21:25:38 UTC

[GitHub] ccollins476ad opened a new pull request #323: MYNEWT-774 Serial errors in newtmgr messages

ccollins476ad opened a new pull request #323: MYNEWT-774 Serial errors in newtmgr messages
URL: https://github.com/apache/incubator-mynewt-core/pull/323
 
 
   Using the nmgr_shell transport (newtmgr over shell), some incoming commands get dropped.  The problem seems to be caused by an exhaustion of shell events.  By default, the shell only allocates a single event.
   
   The sequence looks like this:
       1. Client sends newtmgr command to device.
       2. Console passes newtmgr command to shell.
       3. Shell allocates the only event and fills it with the data.
       4. Shell processes event, hands data to newtmgr code.
       5. Newtmgr processes command and sends response.
       6. Client sees response and sends follow-up command.
       7. Console passes newtmgr command to shell.
       8. Shell has no events left; drops incoming command.
       9. Initial event gets freed.
   
   By changing the default event count from 1 to 2, we ensure there is always a spare event available.  Since we will never send the second response before freeing the first event, two events is sufficient.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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