You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "HedongGao (via GitHub)" <gi...@apache.org> on 2024/06/06 04:31:39 UTC

[PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

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

   ## Summary
   If the speed of the can stack receiving packets is greater than the speed of the application layer reading packets, then conn ->readahead will continue to grow, leading to memory leaks。
   To prevent memory leaks, users can restrict can socket buffer length.
   
   ## Impact
   Can socket recive packet.
   
   ## Testing
   Manually!  
   Create a can socket, then send can frames to this socket,  but the application layer does not read data from this socket.  Then memory leak. 
    
   
   


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


Re: [PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

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

   @PetervdPerk-NXP Please have a look


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


Re: [PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

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

   Sorry there are some wrong in this request, I must revert 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


Re: [PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

Posted by "HedongGao (via GitHub)" <gi...@apache.org>.
HedongGao closed pull request #12461: net/can: Add SO_RCVBUF option for can socket
URL: https://github.com/apache/nuttx/pull/12461


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


Re: [PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

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

   > So why isn't `ret = iob_tryadd_queue(iob, &conn->readahead);` enough and how would this leak memory?
   > 
   > Or do you mean that CAN could potentially starve out all IOB buffers?
   
   Yes! 
   CAN could potentially starve out all IOB buffers, if application layer does not read data from this socket.


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


Re: [PR] net/can: Add SO_RCVBUF option for can socket [nuttx]

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

   So why isn't `ret = iob_tryadd_queue(iob, &conn->readahead);` enough and how would this leak memory?
   
   Or do you mean that CAN could potentially starve out all IOB buffers?


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