Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758383Ab3E1Ag5 (ORCPT ); Mon, 27 May 2013 20:36:57 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:36171 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758271Ab3E1Agz (ORCPT ); Mon, 27 May 2013 20:36:55 -0400 Message-ID: <1369701413.3301.506.camel@edumazet-glaptop> Subject: Re: [PATCH v5 net-next 3/5] tcp: add TCP support for low latency receive poll. From: Eric Dumazet To: Eliezer Tamir Cc: Dave Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jesse Brandeburg , Don Skidmore , e1000-devel@lists.sourceforge.net, Willem de Bruijn , Andi Kleen , HPA , Eilon Greenstien , Or Gerlitz , Alex Rosenbaum , Eliezer Tamir Date: Mon, 27 May 2013 17:36:53 -0700 In-Reply-To: <20130527074421.29882.73968.stgit@ladj378.jer.intel.com> References: <20130527074351.29882.51106.stgit@ladj378.jer.intel.com> <20130527074421.29882.73968.stgit@ladj378.jer.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2508 Lines: 90 On Mon, 2013-05-27 at 10:44 +0300, Eliezer Tamir wrote: > adds busy-poll support for TCP. > Really, this is a small changelog for such an addition :( How poll()/epoll() is supported ? > Signed-off-by: Alexander Duyck > Signed-off-by: Jesse Brandeburg > Tested-by: Willem de Bruijn > Signed-off-by: Eliezer Tamir > --- > > net/ipv4/tcp.c | 5 +++++ > net/ipv4/tcp_input.c | 1 + > net/ipv4/tcp_ipv4.c | 2 ++ > 3 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index d87ce72..652c75a 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -279,6 +279,7 @@ > > #include > #include > +#include > > int sysctl_tcp_fin_timeout __read_mostly = TCP_FIN_TIMEOUT; > > @@ -1551,6 +1552,10 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, > struct sk_buff *skb; > u32 urg_hole = 0; > > + if (sk_valid_ll(sk) && skb_queue_empty(&sk->sk_receive_queue) > + && (sk->sk_state == TCP_ESTABLISHED)) > + sk_poll_ll(sk, nonblock); > + > lock_sock(sk); > > err = -ENOTCONN; > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > index 9579e1a..4d82939 100644 > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c > @@ -74,6 +74,7 @@ > #include > #include > #include > +#include > Not sure why this include is needed in this file ? You added nothing else but this line. > int sysctl_tcp_timestamps __read_mostly = 1; > int sysctl_tcp_window_scaling __read_mostly = 1; > diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c > index d20ede0..35fd8bc 100644 > --- a/net/ipv4/tcp_ipv4.c > +++ b/net/ipv4/tcp_ipv4.c > @@ -75,6 +75,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -2011,6 +2012,7 @@ process: > if (sk_filter(sk, skb)) > goto discard_and_relse; > > + sk_mark_ll(sk, skb); > skb->dev = NULL; > > bh_lock_sock_nested(sk); How IPv6 is handled ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/