Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Eric Dumazet
Sat, 14 Nov 2026 15:32
Re: [PATCH v1 net-next 1/8] tcp: Clean up the first loop in tcp_collapse().
Author: Eric Dumazet
Date: Sat, 14 Nov 2026 15:32
Date: Sat, 14 Nov 2026 15:32
38 lines
9982 bytes
9982 bytes
Le sam. 14 nov. 2026 ร 05:01, Kuniyuki Iwashima <kuniyu@google.com> a รฉcrit : > > tcp_collapse() detects skb to start collapsing from in the > first loop. > > If the last skb has SYN or FIN, the condition is tested > again after the loop. > > skb_frags_readable() is placed inside and outside of the > loop as well. > > If we goto skip_this in both cases, we can remove the second > tests and simply replace end_of_skbs with the inverted loop > condition. > > Then, we do not need a test for tcp_collapse_one() too. > > Also, skb_frags_readable() should be tested after the fully > overlapping check. > > Let's clean up the loop. This is not only a cleanup. Before this patch, when a SYN/FIN skb was overlapping with the next skb, the loop was left with end_of_skbs == false, and the test following the loop made tcp_collapse() return: nothing after this skb was collapsed. After this patch, this skb is skipped and the following skbs are considered. I think the new behavior is fine, but please mention it in the changelog. Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads