mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
udp: avoid one cache line miss in recvmsg()
UDP_SKB_CB(skb)->partial_cov is located at offset 66 in skb, requesting a cold cache line being read in cpu cache. We can avoid this cache line miss for UDP sockets, as partial_cov has a meaning only for UDPLite. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ee9d5461c0
commit
d21dbdfe0a
@ -1389,7 +1389,8 @@ try_again:
|
||||
* coverage checksum (UDP-Lite), do it before the copy.
|
||||
*/
|
||||
|
||||
if (copied < ulen || UDP_SKB_CB(skb)->partial_cov || peeking) {
|
||||
if (copied < ulen || peeking ||
|
||||
(is_udplite && UDP_SKB_CB(skb)->partial_cov)) {
|
||||
checksum_valid = !udp_lib_checksum_complete(skb);
|
||||
if (!checksum_valid)
|
||||
goto csum_copy_err;
|
||||
|
@ -363,7 +363,8 @@ try_again:
|
||||
* coverage checksum (UDP-Lite), do it before the copy.
|
||||
*/
|
||||
|
||||
if (copied < ulen || UDP_SKB_CB(skb)->partial_cov || peeking) {
|
||||
if (copied < ulen || peeking ||
|
||||
(is_udplite && UDP_SKB_CB(skb)->partial_cov)) {
|
||||
checksum_valid = !udp_lib_checksum_complete(skb);
|
||||
if (!checksum_valid)
|
||||
goto csum_copy_err;
|
||||
|
Loading…
Reference in New Issue
Block a user