• Eric Dumazet's avatar
    tcp: use TCP_SKB_CB(skb)->tcp_flags in input path · e11ecddf
    Eric Dumazet authored
    Input path of TCP do not currently uses TCP_SKB_CB(skb)->tcp_flags,
    which is only used in output path.
    
    tcp_recvmsg(), looks at tcp_hdr(skb)->syn for every skb found in receive queue,
    and its unfortunate because this bit is located in a cache line right before
    the payload.
    
    We can simplify TCP by copying tcp flags into TCP_SKB_CB(skb)->tcp_flags.
    
    This patch does so, and avoids the cache line miss in tcp_recvmsg()
    
    Following patches will
    - allow a segment with FIN being coalesced in tcp_try_coalesce()
    - simplify tcp_collapse() by not copying the headers.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e11ecddf
tcp_ipv4.c 62.8 KB