On Tue, Nov 27, 2018 at 2:13 PM Eric Dumazet <eric.duma...@gmail.com> wrote:
>
>
>
> On 11/27/2018 01:58 PM, Neal Cardwell wrote:
>
> > I wonder if technically perhaps the logic should skip coalescing if
> > the tail or skb has the TCP_FLAG_URG bit set? It seems if skbs are
> > coalesced, and some have urgent data and some do not, then the
> > TCP_FLAG_URG bit will be accumulated into the tail header, but there
> > will be no way to ensure the correct urgent offsets for the one or
> > more skbs with urgent data are passed along.
>
> Yes, I guess I need to fix that, thanks.
>
> I will simply make sure both thtail->urg and th->urg are not set.
>
> I could only test thtail->urg, but that would require copying th->urg_ptr and 
> th->urg,
> and quite frankly we should not spend cycles on URG stuff.

pseudo code added in V3

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 
9fa7516fb5c33277be4ba3a667ff61202d8dd445..4904250a9aac5001410f9454258cbb8978bb8202
100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1668,6 +1668,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
            TCP_SKB_CB(tail)->ip_dsfield != TCP_SKB_CB(skb)->ip_dsfield ||
+            ((TCP_SKB_CB(tail)->tcp_flags |
+            TCP_SKB_CB(skb)->tcp_flags) & TCPHDR_URG) ||
+           ((TCP_SKB_CB(tail)->tcp_flags ^
+             TCP_SKB_CB(skb)->tcp_flags) & (TCPHDR_ECE | TCPHDR_CWR)) ||
 #ifdef CONFIG_TLS_DEVICE
            tail->decrypted != skb->decrypted ||
 #endif

Reply via email to