aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-11-11 08:54:27 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-11 13:00:05 -0500
commit3d97379a67486bc481ab5b8f7aa5b7ceb6154a95 (patch)
tree0a3d911efa46affbd5cd26a4d34f96878b8fa83a /net/ipv6
parent2e1af7d74f4f7b4d4c1b0fbf5da3b5f92d9c332f (diff)
tcp: move sk_mark_napi_id() at the right place
sk_mark_napi_id() is used to record for a flow napi id of incoming packets for busypoll sake. We should do this only on established flows, not on listeners. This was 'working' by virtue of the socket cloning, but doing this on SYN packets in unecessary cache line dirtying. Even if we move sk_napi_id in the same cache line than sk_lock, we are working to make SYN processing lockless, so it is desirable to set sk_napi_id only for established flows. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/tcp_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index ace29b60813c..fd8e50b380e7 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1293,6 +1293,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
1293 struct dst_entry *dst = sk->sk_rx_dst; 1293 struct dst_entry *dst = sk->sk_rx_dst;
1294 1294
1295 sock_rps_save_rxhash(sk, skb); 1295 sock_rps_save_rxhash(sk, skb);
1296 sk_mark_napi_id(sk, skb);
1296 if (dst) { 1297 if (dst) {
1297 if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif || 1298 if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif ||
1298 dst->ops->check(dst, np->rx_dst_cookie) == NULL) { 1299 dst->ops->check(dst, np->rx_dst_cookie) == NULL) {
@@ -1322,6 +1323,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
1322 */ 1323 */
1323 if (nsk != sk) { 1324 if (nsk != sk) {
1324 sock_rps_save_rxhash(nsk, skb); 1325 sock_rps_save_rxhash(nsk, skb);
1326 sk_mark_napi_id(sk, skb);
1325 if (tcp_child_process(sk, nsk, skb)) 1327 if (tcp_child_process(sk, nsk, skb))
1326 goto reset; 1328 goto reset;
1327 if (opt_skb) 1329 if (opt_skb)
@@ -1454,7 +1456,6 @@ process:
1454 if (sk_filter(sk, skb)) 1456 if (sk_filter(sk, skb))
1455 goto discard_and_relse; 1457 goto discard_and_relse;
1456 1458
1457 sk_mark_napi_id(sk, skb);
1458 skb->dev = NULL; 1459 skb->dev = NULL;
1459 1460
1460 bh_lock_sock_nested(sk); 1461 bh_lock_sock_nested(sk);