yamt commented on pull request #4080:
URL: https://github.com/apache/incubator-nuttx/pull/4080#issuecomment-876807245


   > > do you mean where to put the semaphore or an equivalent of it?
   > > what's wrong with eg. conn->snd_buf_sem?
   > > psock_send_eventhandler can wake it up when some buffers are acked by 
the peer.
   > 
   > not just psock_send_eventhandler(). I think semaphore put should be done 
wherever wrbuffer is released.
   
   as far as i understand, the data in the send buffer is disposed only when
   
   * acked by the peer (psock_send_eventhandler)
   * connection is closed
   
   > 
   > ```
   > net/tcp/tcp_send_buffered.c:214:          tcp_wrbuffer_release((FAR struct 
tcp_wrbuffer_s *)entry);
   > net/tcp/tcp_send_buffered.c:220:          tcp_wrbuffer_release((FAR struct 
tcp_wrbuffer_s *)entry);
   > net/tcp/tcp_send_buffered.c:434:                  
tcp_wrbuffer_release(wrb);
   > net/tcp/tcp_send_buffered.c:607:              tcp_wrbuffer_release(wrb);
   > net/tcp/tcp_send_buffered.c:672:              tcp_wrbuffer_release(wrb);
   > net/tcp/tcp_send_buffered.c:1246:  tcp_wrbuffer_release(wrb);
   > net/tcp/tcp_conn.c:741:      tcp_wrbuffer_release(wrbuffer);
   > net/tcp/tcp_conn.c:747:      tcp_wrbuffer_release(wrbuffer);
   > net/tcp/tcp_wrbuffer.c:157:      tcp_wrbuffer_release(wrb);
   > net/tcp/tcp_wrbuffer.c:213:      tcp_wrbuffer_release(wrb);
   > ```
   > 
   > > maybe it works for the majority of cases, yes.
   > > i suspect it can be a problem for a small sndbuf though.
   > 
   > This issue is inherent in the configuration of small buffers, SO_SNDBUF is 
just a suggestion value, How about keeping the current behavior?
   
   i'm not sure what you mean here. can you explain a bit?
   
   


-- 
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-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to