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 2021/03/11 06:52:10 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2772: imx6 enet with TCP_WRITE_BUFFERS

yamt commented on a change in pull request #2772:
URL: https://github.com/apache/incubator-nuttx/pull/2772#discussion_r592105482



##########
File path: net/tcp/tcp_send_buffered.c
##########
@@ -1144,6 +1144,11 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
            */
 
           blresult = net_breaklock(&count);
+
+          /* NOTE: At least IOB needs to hold the packet */
+
+          DEBUGASSERT((CONFIG_IOB_NBUFFERS * CONFIG_IOB_BUFSIZE) > len);

Review comment:
       panicking on user-supplied value (`len`) is not a good idea.
   what's wrong with making the below TCP_WBCOPYIN fail?




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