Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754148AbdCPWE6 (ORCPT ); Thu, 16 Mar 2017 18:04:58 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36261 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753832AbdCPWE4 (ORCPT ); Thu, 16 Mar 2017 18:04:56 -0400 Message-ID: <1489701893.28631.248.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: [net-next PATCH 2/5] net: Call sk_mark_napi_id() in the ACK receive path From: Eric Dumazet To: Alexander Duyck Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sridhar.samudrala@intel.com, edumazet@google.com, davem@davemloft.net Date: Thu, 16 Mar 2017 15:04:53 -0700 In-Reply-To: <20170316183244.15806.77453.stgit@localhost.localdomain> References: <20170316183142.15806.38824.stgit@localhost.localdomain> <20170316183244.15806.77453.stgit@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 34 On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > Call sk_mark_napi_id() in the ACK receive path of a TCP_NEW_SYN_RECV > socket, so that sk->napi_id is set even if the socket hasn't yet received > any data. With this change we should be able to start busy polling > slightly earlier. > > Signed-off-by: Sridhar Samudrala > Signed-off-by: Alexander Duyck > --- > net/ipv4/tcp_ipv4.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c > index 08d870e45658..b86002a296f1 100644 > --- a/net/ipv4/tcp_ipv4.c > +++ b/net/ipv4/tcp_ipv4.c > @@ -1687,6 +1687,7 @@ int tcp_v4_rcv(struct sk_buff *skb) > tcp_v4_send_reset(nsk, skb); > goto discard_and_relse; > } else { > + sk_mark_napi_id(nsk, skb); > sock_put(sk); > return 0; > } > Seems good, but what about IPv6 ? Frankly this calls for the sk_mark_napi_id() being done in tcp_child_process() instead of its four callers.