lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140915.144137.278293056053518622.davem@davemloft.net>
Date:	Mon, 15 Sep 2014 14:41:37 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	edumazet@...gle.com
Cc:	netdev@...r.kernel.org, ycheng@...gle.com, ncardwell@...gle.com
Subject: Re: [PATCH v2 net-next 0/3] tcp: no longer keep around headers in
 input path

From: Eric Dumazet <edumazet@...gle.com>
Date: Mon, 15 Sep 2014 04:19:50 -0700

> Looking at tcp_try_coalesce() I was wondering why I did :
> 
> if (tcp_hdr(from)->fin)
>      return false;
> 
> The answer would be to allow the aggregation, if we simply OR the FIN and PSH
> flags eventually present in @from to @to packet. (Note a change is also
> needed in skb_try_coalesce() to avoid calling skb_put() with 0 len)
> 
> Then, looking at tcp_recvmsg(), I realized we access tcp_hdr(skb)->syn
> (and maybe tcp_hdr(skb)->fin) for every packet we process from socket
> receive queue.
> 
> We have to understand TCP flags are cold in cpu caches most of the time
> (assuming TCP timestamps, and that application calls recvmsg() a long
> time after incoming packet was processed), and bringing a whole
> cache line only to access one bit is not very nice.
> 
> It would make sense to use in TCP input path TCP_SKB_CB(skb)->tcp_flags
> as we do in output path.
> 
> This saves one cache line miss, and TCP tcp_collapse() can avoid dealing
> with the headers.

Looks great, applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ