Eric Dumazet ee2aabd3fc tcp: refine tcp_write_queue_empty() implementation
Due to how tcp_sendmsg() is implemented, we can have an empty
skb at the tail of the write queue.

Most [1] tcp_write_queue_empty() callers want to know if there is
anything to send (payload and/or FIN)

Instead of checking if the sk_write_queue is empty, we need
to test if tp->write_seq == tp->snd_nxt

[1] tcp_send_fin() was the only caller that expected to
 see if an skb was in the write queue, I have changed the code
 to reuse the tcp_write_queue_tail() result.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
2019-12-13 21:58:40 -08:00
..
2019-01-23 11:18:00 -08:00
2019-04-19 14:07:40 -07:00
2019-10-23 20:13:22 -07:00
2019-09-13 21:44:19 +02:00
2019-11-21 14:45:55 -08:00
2018-09-13 09:04:58 -07:00
2017-12-05 14:37:13 -05:00
2018-05-16 07:23:35 +02:00
2019-04-22 21:47:25 -07:00
2019-10-05 16:29:00 -07:00
2019-12-09 10:28:43 -08:00
2019-06-19 11:23:13 -04:00