net: ip_queue_rcv_skb() helper
When queueing a skb to socket, we can immediately release its dst if target socket do not use IP_CMSG_PKTINFO. tcp_data_queue() can drop dst too. This to benefit from a hot cache line and avoid the receiver, possibly on another cpu, to dirty this cache line himself. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4b0b72f7dd
commit
f84af32cbc
@@ -1264,7 +1264,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
|
||||
if (inet_sk(sk)->inet_daddr)
|
||||
sock_rps_save_rxhash(sk, skb->rxhash);
|
||||
|
||||
rc = sock_queue_rcv_skb(sk, skb);
|
||||
rc = ip_queue_rcv_skb(sk, skb);
|
||||
if (rc < 0) {
|
||||
int is_udplite = IS_UDPLITE(sk);
|
||||
|
||||
|
Reference in New Issue
Block a user