You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fjpanag (via GitHub)" <gi...@apache.org> on 2023/05/29 21:26:55 UTC

[GitHub] [nuttx] fjpanag opened a new pull request, #9423: udp: Fix block when devif_send fails.

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

   ## Summary
   
   Draft.
   
   ## Impact
   
   ## Testing
   
   


-- 
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] fjpanag commented on a diff in pull request #9423: net: Fix task block when devif_send fails.

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


##########
net/can/can_sendmsg.c:
##########
@@ -106,11 +106,13 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
         {
           /* Copy the packet data into the device packet buffer and send it */
 
-          devif_send(dev, pstate->snd_buffer, pstate->snd_buflen, 0);
+          int ret = devif_send(dev, pstate->snd_buffer,
+                               pstate->snd_buflen, 0);
           dev->d_len = dev->d_sndlen;

Review Comment:
   It was like this before, and this is only for CAN.
   I don't know if this assignment is important for the CAN system or its drivers, and I cannot test it.
   
   I would prefer to leave it as is, and not touch it. Unless you are sure and insist.



-- 
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 merged pull request #9423: net: Fix task block when devif_send fails.

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


-- 
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 #9423: udp: Fix block when devif_send fails.

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


##########
net/udp/udp_sendto_unbuffered.c:
##########
@@ -198,7 +198,8 @@ static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
                      pstate->st_buflen, udpip_hdrsize(pstate->st_conn));

Review Comment:
   It's enough to change void to int:
   ```
   int devif_send(FAR struct net_driver_s *dev, FAR const void *buf,
                   int len, unsigned int offset);
   ```
   maybe all similar function need 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.

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 #9423: net: Fix task block when devif_send fails.

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


##########
net/can/can_sendmsg.c:
##########
@@ -106,11 +106,13 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
         {
           /* Copy the packet data into the device packet buffer and send it */
 
-          devif_send(dev, pstate->snd_buffer, pstate->snd_buflen, 0);
+          int ret = devif_send(dev, pstate->snd_buffer,
+                               pstate->snd_buflen, 0);
           dev->d_len = dev->d_sndlen;

Review Comment:
   Ok



-- 
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] fjpanag commented on a diff in pull request #9423: udp: Fix block when devif_send fails.

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


##########
net/udp/udp_sendto_unbuffered.c:
##########
@@ -198,7 +198,8 @@ static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
                      pstate->st_buflen, udpip_hdrsize(pstate->st_conn));

Review Comment:
   @xiaoxiang781216 What do you think of the new `devif_send` prototype?
   
   *(Ignore the build errors, soon I will fix all uses of this function, and properly test this.)*



-- 
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 #9423: net: Fix task block when devif_send fails.

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


##########
net/can/can_sendmsg.c:
##########
@@ -106,11 +106,13 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
         {
           /* Copy the packet data into the device packet buffer and send it */
 
-          devif_send(dev, pstate->snd_buffer, pstate->snd_buflen, 0);
+          int ret = devif_send(dev, pstate->snd_buffer,
+                               pstate->snd_buflen, 0);
           dev->d_len = dev->d_sndlen;

Review Comment:
   should we move this after line 117 or remove 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] xiaoxiang781216 commented on a diff in pull request #9423: udp: Fix block when devif_send fails.

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


##########
net/udp/udp_sendto_unbuffered.c:
##########
@@ -198,7 +198,8 @@ static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
                      pstate->st_buflen, udpip_hdrsize(pstate->st_conn));

Review Comment:
   is it better to return the error from devif_send and related api?



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