You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/10 07:19:27 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request #2511: wireless/bluetooth: fix the invalid life cycle of hci buffer

anchao opened a new pull request #2511:
URL: https://github.com/apache/incubator-nuttx/pull/2511


   ## Summary
   
   fix the invalid life cycle of hci buffer if WIRELESS_BLUETOOTH_HOST is enabled
   
   Regression by:
   
   https://github.com/apache/incubator-nuttx/pull/2070
   
   5386f972fa8020b69798ab70325b7f4df0f20cf3
   
   Signed-off-by: chao.an <an...@xiaomi.com>
   
   ## Impact
   
   sim/bthcisock
   
   ## Testing
   
   sim/bthcisock


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] btashton commented on pull request #2511: wireless/bluetooth: fix the invalid life cycle of hci buffer

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #2511:
URL: https://github.com/apache/incubator-nuttx/pull/2511#issuecomment-742309547


   @anchao see the PR here https://github.com/apache/incubator-nuttx/pull/2302/files
   
   I have lost track of the state of this, but the change in your PR is not right because we cannot be making this change in all of the boards. If I remember correctly this `bt_buf_release` never should have been in the sim driver in the first place and instead we should have been decrementing the ref count before it was sent to the user bluetooth stack.


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] v01d commented on pull request #2511: wireless/bluetooth: fix the invalid life cycle of hci buffer

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #2511:
URL: https://github.com/apache/incubator-nuttx/pull/2511#issuecomment-742544888


   As discussed in the linked PR, I don't really know how to make the proper fix as NuttX's bluetooth stack defers buffer cleaning. I understand the idea of decrementing the buffer reference count in principle but I just don't know how to implement that, considering that it should also be handled correctly when NuttX's host layer is disabled. I was hoping @btashton if you could sometime take a look at the code and see if you can figure how to make the correct change.


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] anchao closed pull request #2511: wireless/bluetooth: fix the invalid life cycle of hci buffer

Posted by GitBox <gi...@apache.org>.
anchao closed pull request #2511:
URL: https://github.com/apache/incubator-nuttx/pull/2511


   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] anchao commented on pull request #2511: wireless/bluetooth: fix the invalid life cycle of hci buffer

Posted by GitBox <gi...@apache.org>.
anchao commented on pull request #2511:
URL: https://github.com/apache/incubator-nuttx/pull/2511#issuecomment-742343877


   > @anchao see the PR here https://github.com/apache/incubator-nuttx/pull/2302/files
   > 
   > I have lost track of the state of this, but the change in your PR is not right because we cannot be making this change in all of the boards. If I remember correctly this `bt_buf_release` never should have been in the sim driver in the first place and instead we should have been decrementing the ref count before it was sent to the user bluetooth stack.
   
   Hi @btashton ,
   
   Thanks for your comment,
   
   Yes, it is strange to touch the bt_buf_() in arch layer,
   Matias's #2302 is already working on it. Let me close this PR.


----------------------------------------------------------------
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