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 2022/07/13 06:11:43 UTC

[GitHub] [incubator-nuttx] mkeydevelop opened a new pull request, #6608: net: Fix frame count check fail and race condition

mkeydevelop opened a new pull request, #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608

   Signed-off-by: larry <la...@transtekcorp.com>
   
   Frame count check will fail if input more than one frame before receive
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] mkeydevelop commented on a diff in pull request #6608: net: Fix frame count check fail and race condition

Posted by GitBox <gi...@apache.org>.
mkeydevelop commented on code in PR #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608#discussion_r921238884


##########
net/bluetooth/bluetooth_input.c:
##########
@@ -119,6 +121,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
 
   /* Add the container to the tail of the list of incoming frames */
 
+  flags = enter_critical_section();

Review Comment:
   Remove all critical section code
   net_lock is already called before xx_queue_frame/xx_recvmsg



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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] mkeydevelop commented on a diff in pull request #6608: net: Fix frame count check fail and race condition

Posted by GitBox <gi...@apache.org>.
mkeydevelop commented on code in PR #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608#discussion_r920746147


##########
net/bluetooth/bluetooth_input.c:
##########
@@ -119,6 +121,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
 
   /* Add the container to the tail of the list of incoming frames */
 
+  flags = enter_critical_section();

Review Comment:
   Critical section code is already existed in net stack code, and BT/ ieee802154 is pure kernel code, so add new critical section call in here is acceptable.
   And, lock code region is very short, use critical section would be more efficient and no impact on system latency. I think it's more acceptable.



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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6608: net: Fix frame count check fail and race condition

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608#discussion_r919913515


##########
net/bluetooth/bluetooth_input.c:
##########
@@ -119,6 +121,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
 
   /* Add the container to the tail of the list of incoming frames */
 
+  flags = enter_critical_section();

Review Comment:
   should we use net_lock/net_unlock?



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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6608: net: Fix frame count check fail and race condition

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608#discussion_r920770148


##########
net/bluetooth/bluetooth_input.c:
##########
@@ -119,6 +121,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
 
   /* Add the container to the tail of the list of incoming frames */
 
+  flags = enter_critical_section();

Review Comment:
   If you don't need sync with the interrupt handler, net_loc/net_unlock is prefer than the crititical section, it's especially the code in net folder.



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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #6608: net: Fix frame count check fail and race condition

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6608:
URL: https://github.com/apache/incubator-nuttx/pull/6608


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

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org