BACKPORT: tcp: add tcp_ooo_try_coalesce() helper

In case skb in out_or_order_queue is the result of
multiple skbs coalescing, we would like to get a proper gso_segs
counter tracking, so that future tcp_drop() can report an accurate

I chose to not implement this tracking for skbs in receive queue,
since they are not dropped, unless socket is disconnected.

Signed-off-by: Eric Dumazet <>
Acked-by: Soheil Hassas Yeganeh <>
Acked-by: Yuchung Cheng <>
Signed-off-by: David S. Miller <>
(cherry picked from commit 58152ecbbcc6a0ce7fddd5bf5f6ee535834ece0c)

TEST=tcp connection test

Change-Id: I45b52be7bc812b41c8375a76a86f843fd0847d31
Signed-off-by: Guenter Roeck <>
Reviewed-by: Daniel Wang <>
Reviewed-by: Dylan Reid <>
(cherry picked from commit c52650426c2d42a8468dfc02c1c26d40a12974cd)
Signed-off-by: Guenter Roeck <>
1 file changed