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/07/05 08:24:15 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request #4069: net/socket: add SO_RCVBUF support

anchao opened a new pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069


   ## Summary
   
   net/socket: add SO_RCVBUF support
   
   Reference here:
   https://www.freebsd.org/cgi/man.cgi?query=setsockopt&sektion=2&format=html
   
   ## Impact
   
   add SO_RCVBUF support to limit the sharing of iob buffers under multiple TCP/UDP connections
   
   ## Testing
   
   http audio streaming(client) with multiple instance and playback at same time


-- 
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] Virus-V commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
Virus-V commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r664247917



##########
File path: net/socket/setsockopt.c
##########
@@ -131,9 +131,71 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
             {
               _SO_SETOPT(psock->s_options, option);
             }
+
+          return OK;
         }
 
-        return OK;
+#if CONFIG_NET_RECV_BUFSIZE > 0
+      case SO_RCVBUF:     /* Sets receive buffer size */
+        {
+          int buffersize;
+
+          /* Verify that option is the size of an 'int'.  Should also check
+           * that 'value' is properly aligned for an 'int'
+           */
+
+          if (value_len != sizeof(int))
+            {
+              return -EINVAL;
+            }
+
+          /* Get the value.  Is the option being set or cleared? */
+
+          buffersize = *(FAR int *)value;
+
+          if (buffersize < 0 || buffersize > INT_MAX)
+            {
+              return -EINVAL;
+            }
+
+          net_lock();
+
+#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
+          if (psock->s_type == SOCK_STREAM)
+            {
+              FAR struct tcp_conn_s *conn;
+
+              conn = (FAR struct tcp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcv_bufs = buffersize;
+            }
+          else
+#endif
+#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
+          if (psock->s_type == SOCK_DGRAM)
+            {
+              FAR struct udp_conn_s *conn;
+
+              conn = (FAR struct udp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcvbufs = buffersize;

Review comment:
       Should be `rcv_bufs`?




-- 
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] anchao commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663811404



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       The behavior here is the result of my test on Linux. If the UDP network storm comes and exceeds the limit of recv, the old packets will be discarded

##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       Yes, I can't find a suitable reference except Linux. Do you have any suggestions?

##########
File path: net/socket/setsockopt.c
##########
@@ -131,9 +131,71 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
             {
               _SO_SETOPT(psock->s_options, option);
             }
+
+          return OK;
         }
 
-        return OK;
+#if CONFIG_NET_RECV_BUFSIZE > 0
+      case SO_RCVBUF:     /* Sets receive buffer size */
+        {
+          int buffersize;
+
+          /* Verify that option is the size of an 'int'.  Should also check
+           * that 'value' is properly aligned for an 'int'
+           */
+
+          if (value_len != sizeof(int))
+            {
+              return -EINVAL;
+            }
+
+          /* Get the value.  Is the option being set or cleared? */
+
+          buffersize = *(FAR int *)value;
+
+          if (buffersize < 0 || buffersize > INT_MAX)
+            {
+              return -EINVAL;
+            }
+
+          net_lock();
+
+#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
+          if (psock->s_type == SOCK_STREAM)
+            {
+              FAR struct tcp_conn_s *conn;
+
+              conn = (FAR struct tcp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcv_bufs = buffersize;
+            }
+          else
+#endif
+#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
+          if (psock->s_type == SOCK_DGRAM)
+            {
+              FAR struct udp_conn_s *conn;
+
+              conn = (FAR struct udp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcvbufs = buffersize;

Review comment:
       The naming style follows the member of tcp_conn_s/udp_conn_s, tcp is rcv_bufs, udp is rcvbufs




-- 
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 merged pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069


   


-- 
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] yamt commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663800441



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       does this mean to drop older packets first? why?

##########
File path: net/tcp/tcp_recvwindow.c
##########
@@ -181,6 +181,29 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
       recvwndo = tailroom;
     }
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  /* Finally, check the receive buffer size further to avoid receive
+   * window out of desire.
+   */

Review comment:
       i guess than conn->readahead == NULL case should be treated as io_pktlen == 0.
   
   that is,
   ```
   queued_bytes = FIONREAD equivalent;
   sbleft = max(conn->rcv_bufs - queued_bytes, 0);
   recvwndo = min(recvwndo, sbleft);
   ```




-- 
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] Virus-V commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
Virus-V commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r664247917



##########
File path: net/socket/setsockopt.c
##########
@@ -131,9 +131,71 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
             {
               _SO_SETOPT(psock->s_options, option);
             }
+
+          return OK;
         }
 
-        return OK;
+#if CONFIG_NET_RECV_BUFSIZE > 0
+      case SO_RCVBUF:     /* Sets receive buffer size */
+        {
+          int buffersize;
+
+          /* Verify that option is the size of an 'int'.  Should also check
+           * that 'value' is properly aligned for an 'int'
+           */
+
+          if (value_len != sizeof(int))
+            {
+              return -EINVAL;
+            }
+
+          /* Get the value.  Is the option being set or cleared? */
+
+          buffersize = *(FAR int *)value;
+
+          if (buffersize < 0 || buffersize > INT_MAX)
+            {
+              return -EINVAL;
+            }
+
+          net_lock();
+
+#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
+          if (psock->s_type == SOCK_STREAM)
+            {
+              FAR struct tcp_conn_s *conn;
+
+              conn = (FAR struct tcp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcv_bufs = buffersize;
+            }
+          else
+#endif
+#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
+          if (psock->s_type == SOCK_DGRAM)
+            {
+              FAR struct udp_conn_s *conn;
+
+              conn = (FAR struct udp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcvbufs = buffersize;

Review comment:
       Should be `rcv_bufs`?




-- 
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] yamt commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663800441



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       does this mean to drop older packets first? why?

##########
File path: net/tcp/tcp_recvwindow.c
##########
@@ -181,6 +181,29 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
       recvwndo = tailroom;
     }
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  /* Finally, check the receive buffer size further to avoid receive
+   * window out of desire.
+   */

Review comment:
       i guess than conn->readahead == NULL case should be treated as io_pktlen == 0.
   
   that is,
   ```
   queued_bytes = FIONREAD equivalent;
   sbleft = max(conn->rcv_bufs - queued_bytes, 0);
   recvwndo = min(recvwndo, sbleft);
   ```

##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       do you mean you followed what linux does?
   

##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       no. i just wanted to know why you did this way.




-- 
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 change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r664252652



##########
File path: net/Kconfig
##########
@@ -117,6 +117,12 @@ config NET_GUARDSIZE
 		packet size will be chopped down to the size indicated in the TCP
 		header.
 
+config NET_RECV_BUFSIZE
+	int "Net Receive buffer size"
+	default 65535

Review comment:
       should we change to zero? so the default setting is same as before(don't limit the receive buffer size).




-- 
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] anchao commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663811404



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       The behavior here is the result of my test on Linux. If the UDP network storm comes and exceeds the limit of recv, the old packets will be discarded




-- 
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] anchao commented on pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#issuecomment-874444998


   > you should update tcp_maxrcvwin too.
   
   Done


-- 
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 change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r664252652



##########
File path: net/Kconfig
##########
@@ -117,6 +117,12 @@ config NET_GUARDSIZE
 		packet size will be chopped down to the size indicated in the TCP
 		header.
 
+config NET_RECV_BUFSIZE
+	int "Net Receive buffer size"
+	default 65535

Review comment:
       should we change to zero? so the default setting is same as before(don't limit the receive buffer size).




-- 
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] anchao commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663831124



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       Yes, I can't find a suitable reference except Linux. Do you have any suggestions?




-- 
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] yamt commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663821574



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       do you mean you followed what linux does?
   




-- 
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 merged pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069


   


-- 
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] yamt commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r663959314



##########
File path: net/udp/udp_callback.c
##########
@@ -83,6 +83,14 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   FAR void  *src_addr;
   uint8_t src_addr_size;
 
+#if CONFIG_NET_RECV_BUFSIZE > 0
+  while (iob_get_queue_size(&conn->readahead) > conn->rcvbufs)
+    {
+      iob = iob_remove_queue(&conn->readahead);
+      iob_free_chain(iob, IOBUSER_NET_UDP_READAHEAD);
+    }
+#endif

Review comment:
       no. i just wanted to know why you did this way.




-- 
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] anchao commented on a change in pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#discussion_r664249503



##########
File path: net/socket/setsockopt.c
##########
@@ -131,9 +131,71 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
             {
               _SO_SETOPT(psock->s_options, option);
             }
+
+          return OK;
         }
 
-        return OK;
+#if CONFIG_NET_RECV_BUFSIZE > 0
+      case SO_RCVBUF:     /* Sets receive buffer size */
+        {
+          int buffersize;
+
+          /* Verify that option is the size of an 'int'.  Should also check
+           * that 'value' is properly aligned for an 'int'
+           */
+
+          if (value_len != sizeof(int))
+            {
+              return -EINVAL;
+            }
+
+          /* Get the value.  Is the option being set or cleared? */
+
+          buffersize = *(FAR int *)value;
+
+          if (buffersize < 0 || buffersize > INT_MAX)
+            {
+              return -EINVAL;
+            }
+
+          net_lock();
+
+#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
+          if (psock->s_type == SOCK_STREAM)
+            {
+              FAR struct tcp_conn_s *conn;
+
+              conn = (FAR struct tcp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcv_bufs = buffersize;
+            }
+          else
+#endif
+#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
+          if (psock->s_type == SOCK_DGRAM)
+            {
+              FAR struct udp_conn_s *conn;
+
+              conn = (FAR struct udp_conn_s *)psock->s_conn;
+
+              /* Save the receive buffer size */
+
+              conn->rcvbufs = buffersize;

Review comment:
       The naming style follows the member of tcp_conn_s/udp_conn_s, tcp is rcv_bufs, udp is rcvbufs




-- 
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] anchao commented on pull request #4069: net/socket: add SO_RCVBUF support

Posted by GitBox <gi...@apache.org>.
anchao commented on pull request #4069:
URL: https://github.com/apache/incubator-nuttx/pull/4069#issuecomment-874444998


   > you should update tcp_maxrcvwin too.
   
   Done


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