Browse Source

tcp: call sk_mark_napi_id() on the child, not the listener

This fixes a typo : We want to store the NAPI id on child socket.
Presumably nobody really uses busy polling, on short lived flows.

Fixes: 3d97379a67486 ("tcp: move sk_mark_napi_id() at the right place")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet 10 years ago
parent
commit
38cb52455c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      net/ipv4/tcp_ipv4.c
  2. 1 1
      net/ipv6/tcp_ipv6.c

+ 1 - 1
net/ipv4/tcp_ipv4.c

@@ -1411,7 +1411,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 
 
 		if (nsk != sk) {
 		if (nsk != sk) {
 			sock_rps_save_rxhash(nsk, skb);
 			sock_rps_save_rxhash(nsk, skb);
-			sk_mark_napi_id(sk, skb);
+			sk_mark_napi_id(nsk, skb);
 			if (tcp_child_process(sk, nsk, skb)) {
 			if (tcp_child_process(sk, nsk, skb)) {
 				rsk = nsk;
 				rsk = nsk;
 				goto reset;
 				goto reset;

+ 1 - 1
net/ipv6/tcp_ipv6.c

@@ -1265,7 +1265,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 		 */
 		 */
 		if (nsk != sk) {
 		if (nsk != sk) {
 			sock_rps_save_rxhash(nsk, skb);
 			sock_rps_save_rxhash(nsk, skb);
-			sk_mark_napi_id(sk, skb);
+			sk_mark_napi_id(nsk, skb);
 			if (tcp_child_process(sk, nsk, skb))
 			if (tcp_child_process(sk, nsk, skb))
 				goto reset;
 				goto reset;
 			if (opt_skb)
 			if (opt_skb)