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 2020/12/07 13:23:53 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #2489: [Performance]net/tcp: send the ACK in time after obtain ahead buffer from iobs

patacongo commented on a change in pull request #2489:
URL: https://github.com/apache/incubator-nuttx/pull/2489#discussion_r537499841



##########
File path: net/tcp/tcp_recvfrom.c
##########
@@ -636,14 +683,18 @@ ssize_t psock_tcp_recvfrom(FAR struct socket *psock, FAR void *buf,
                            size_t len, int flags, FAR struct sockaddr *from,
                            FAR socklen_t *fromlen)
 {
+  FAR struct tcp_conn_s *conn;
   struct tcp_recvfrom_s state;
   int               ret;

Review comment:
       Align consistently or remove alignment.

##########
File path: net/tcp/tcp_recvfrom.c
##########
@@ -510,6 +510,53 @@ static uint16_t tcp_eventhandler(FAR struct net_driver_s *dev,
   return flags;
 }
 
+/****************************************************************************
+ * Name: tcp_ackhandler
+ *
+ * Description:
+ *   This function is called with the network locked to send the ACK in
+ *   response by the lower, device interfacing layer.
+ *
+ * Input Parameters:
+ *   dev      The structure of the network driver that generated the event.
+ *   pvconn   The connection structure associated with the socket
+ *   flags    Set of events describing why the callback was invoked
+ *
+ * Returned Value:
+ *   ACK should be send in the response.
+ *
+ * Assumptions:
+ *   The network is locked.
+ *
+ ****************************************************************************/
+
+static uint16_t tcp_ackhandler(FAR struct net_driver_s *dev,
+                                 FAR void *pvconn, FAR void *pvpriv,
+                                 uint16_t flags)

Review comment:
       Align formal parameters

##########
File path: net/tcp/tcp_recvfrom.c
##########
@@ -384,7 +384,7 @@ static inline void tcp_sender(FAR struct net_driver_s *dev,
  *
  ****************************************************************************/
 
-static uint16_t tcp_eventhandler(FAR struct net_driver_s *dev,
+static uint16_t tcp_recvhandler(FAR struct net_driver_s *dev,
                                  FAR void *pvconn, FAR void *pvpriv,

Review comment:
       Align formal parameters.




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