Restore condition removed in df3747c660.

I think it allowed to avoid some TX thread wakeups while the socket
buffer is full.  But add there another options if ic_check_send_space
is set, which means socket just reported that new space appeared, so
it may have sense to pull more data from ic_to_send for better TX
coalescing.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2021-03-03 11:58:04 -05:00
parent f2f24008a2
commit aff9b9ee89

View File

@ -975,7 +975,8 @@ icl_send_thread(void *arg)
* This way the icl_conn_send_pdus() can go through
* all the queued PDUs without holding any locks.
*/
STAILQ_CONCAT(&queue, &ic->ic_to_send);
if (STAILQ_EMPTY(&queue) || ic->ic_check_send_space)
STAILQ_CONCAT(&queue, &ic->ic_to_send);
ic->ic_check_send_space = false;
ICL_CONN_UNLOCK(ic);