You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/02/03 19:48:19 UTC

[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8429: Optimize usersock send/recv path

xiaoxiang781216 opened a new pull request, #8429:
URL: https://github.com/apache/nuttx/pull/8429

   ## Summary
   
   - Don't clear available flag if the response indicate there is more space
   - Don't clear available flag if the response indicate there is more data
   
   ## Impact
   
   usrsock
   
   ## Testing
   
   Xiaomi Watch S1 Pro


-- 
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] [nuttx] masayuki2009 merged pull request #8429: Optimize usersock send/recv path

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 merged PR #8429:
URL: https://github.com/apache/nuttx/pull/8429


-- 
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] [nuttx] pkarashchenko commented on a diff in pull request #8429: Optimize usersock send/recv path

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8429:
URL: https://github.com/apache/nuttx/pull/8429#discussion_r1096222883


##########
net/usrsock/usrsock_recvmsg.c:
##########
@@ -83,8 +83,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev,
           pstate->valuelen_nontrunc = conn->resp.valuelen_nontrunc;
         }
 
-      if (pstate->reqstate.result >= 0 ||
-          pstate->reqstate.result == -EAGAIN)
+      if (!(flags & USRSOCK_EVENT_RECVFROM_AVAIL) &&

Review Comment:
   Optional
   ```suggestion
         if ((flags & USRSOCK_EVENT_RECVFROM_AVAIL) == 0 &&
   ```



##########
net/usrsock/usrsock_sendmsg.c:
##########
@@ -71,7 +71,8 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev,
 
       pstate->result = conn->resp.result;
 
-      if (pstate->result >= 0 || pstate->result == -EAGAIN)
+      if (!(flags & USRSOCK_EVENT_SENDTO_READY) &&

Review Comment:
   Optional
   ```suggestion
         if ((flags & USRSOCK_EVENT_SENDTO_READY) == 0 &&
   ```



-- 
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] [nuttx] xiaoxiang781216 commented on a diff in pull request #8429: Optimize usersock send/recv path

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8429:
URL: https://github.com/apache/nuttx/pull/8429#discussion_r1096475200


##########
net/usrsock/usrsock_sendmsg.c:
##########
@@ -71,7 +71,8 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev,
 
       pstate->result = conn->resp.result;
 
-      if (pstate->result >= 0 || pstate->result == -EAGAIN)
+      if (!(flags & USRSOCK_EVENT_SENDTO_READY) &&

Review Comment:
   @pkarashchenko there are many places in both files use `!(flags & xxx)` in if statement, so I prefer to keep the change as it.



-- 
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] [nuttx] pkarashchenko commented on a diff in pull request #8429: Optimize usersock send/recv path

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8429:
URL: https://github.com/apache/nuttx/pull/8429#discussion_r1096508384


##########
net/usrsock/usrsock_sendmsg.c:
##########
@@ -71,7 +71,8 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev,
 
       pstate->result = conn->resp.result;
 
-      if (pstate->result >= 0 || pstate->result == -EAGAIN)
+      if (!(flags & USRSOCK_EVENT_SENDTO_READY) &&

Review Comment:
   NP. It is optional.



-- 
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] [nuttx] pkarashchenko commented on pull request #8429: Optimize usersock send/recv path

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #8429:
URL: https://github.com/apache/nuttx/pull/8429#issuecomment-1416706699

   I will let @masayuki2009 to review and merge 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.

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

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


[GitHub] [nuttx] masayuki2009 commented on pull request #8429: Optimize usersock send/recv path

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 commented on PR #8429:
URL: https://github.com/apache/nuttx/pull/8429#issuecomment-1416732547

   I confirmed that the PR works with spresene:wifi_smp.
   


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