2008-04-14 16:27:27

by Chuck Lever III

[permalink] [raw]
Subject: [PATCH 03/24] SUNRPC: RPC server still uses 2.4 method for disabling TCP Nagle

Use the 2.6 method for disabling TCP Nagle in the kernel's RPC server.

Signed-off-by: Chuck Lever <[email protected]>
---

net/sunrpc/svcsock.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index c475977..6d4162b 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -38,6 +38,7 @@
#include <net/checksum.h>
#include <net/ip.h>
#include <net/ipv6.h>
+#include <net/tcp.h>
#include <net/tcp_states.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>
@@ -1045,7 +1046,6 @@ void svc_cleanup_xprt_sock(void)
static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)
{
struct sock *sk = svsk->sk_sk;
- struct tcp_sock *tp = tcp_sk(sk);

svc_xprt_init(&svc_tcp_class, &svsk->sk_xprt, serv);
set_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags);
@@ -1063,7 +1063,7 @@ static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)
svsk->sk_reclen = 0;
svsk->sk_tcplen = 0;

- tp->nonagle = 1; /* disable Nagle's algorithm */
+ tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF;

/* initialise setting must have enough space to
* receive and respond to one request.



2008-04-14 17:39:07

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [PATCH 03/24] SUNRPC: RPC server still uses 2.4 method for disabling TCP Nagle

On Mon, Apr 14, 2008 at 12:27:01PM -0400, Chuck Lever wrote:
> Use the 2.6 method for disabling TCP Nagle in the kernel's RPC server.

OK.--b.

>
> Signed-off-by: Chuck Lever <[email protected]>
> ---
>
> net/sunrpc/svcsock.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
> index c475977..6d4162b 100644
> --- a/net/sunrpc/svcsock.c
> +++ b/net/sunrpc/svcsock.c
> @@ -38,6 +38,7 @@
> #include <net/checksum.h>
> #include <net/ip.h>
> #include <net/ipv6.h>
> +#include <net/tcp.h>
> #include <net/tcp_states.h>
> #include <asm/uaccess.h>
> #include <asm/ioctls.h>
> @@ -1045,7 +1046,6 @@ void svc_cleanup_xprt_sock(void)
> static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)
> {
> struct sock *sk = svsk->sk_sk;
> - struct tcp_sock *tp = tcp_sk(sk);
>
> svc_xprt_init(&svc_tcp_class, &svsk->sk_xprt, serv);
> set_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags);
> @@ -1063,7 +1063,7 @@ static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)
> svsk->sk_reclen = 0;
> svsk->sk_tcplen = 0;
>
> - tp->nonagle = 1; /* disable Nagle's algorithm */
> + tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF;
>
> /* initialise setting must have enough space to
> * receive and respond to one request.
>