Repository navigation
Commit ee2aabd
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>1 parent 1f85e62 commit ee2aabd
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1766 | 1766 | | |
1767 | 1767 | | |
1768 | 1768 | | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1769 | 1776 | | |
1770 | 1777 | | |
1771 | | - | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
1772 | 1781 | | |
1773 | 1782 | | |
1774 | 1783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3129 | 3129 | | |
3130 | 3130 | | |
3131 | 3131 | | |
3132 | | - | |
| 3132 | + | |
3133 | 3133 | | |
3134 | 3134 | | |
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
3138 | 3138 | | |
3139 | 3139 | | |
| 3140 | + | |
3140 | 3141 | | |
3141 | 3142 | | |
3142 | 3143 | | |
3143 | 3144 | | |
3144 | 3145 | | |
3145 | 3146 | | |
3146 | 3147 | | |
3147 | | - | |
| 3148 | + | |
3148 | 3149 | | |
3149 | 3150 | | |
3150 | 3151 | | |
| |||
0 commit comments