netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: netdev@oss.sgi.com
Cc: mostrows@styx.uwaterloo.ca
Subject: [PATCH] Increase snd/rcv buffers in pppoe
Date: 23 Feb 2004 00:47:50 +0100
Date: Mon, 23 Feb 2004 00:47:50 +0100	[thread overview]
Message-ID: <20040222234750.GA78924@colin2.muc.de> (raw)


I noticed that a 64bit kernel only downloads half as fast over a PPPoE DSL
connection than a 32bit kernel on the same hardware. The reason seems
to be that PPPoE uses the default 64K snd/rcv buffers at socket creation.
The bigger sk_buff header size on the 64bit kernel pushed
the buffer into being too small and preventing good throughput.

This patch fixes it here. It simply doubles the buffers. There should
be only a few PPPoE sockets active so I don't think this is a problem.
The TX increase is probably not needed because upload speeds on DSL
are typically much slower than RX, but it also cannot hurt.

-Andi


diff -u linux-2.6.3-amd64/drivers/net/pppoe.c-o linux-2.6.3-amd64/drivers/net/pppoe.c
--- linux-2.6.3-amd64/drivers/net/pppoe.c-o	2004-02-19 23:28:07.000000000 +0100
+++ linux-2.6.3-amd64/drivers/net/pppoe.c	2004-02-24 22:02:17.000000000 +0100
@@ -506,6 +506,10 @@
 		goto out;
 
 	sock_init_data(sock, sk);
+
+	sk->sk_rcvbuf *= 2;
+	sk->sk_sndbuf *= 2;
+
 	sk_set_owner(sk, THIS_MODULE);
 	sock->state = SS_UNCONNECTED;
 	sock->ops   = &pppoe_ops;

             reply	other threads:[~2004-02-22 23:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-22 23:47 Andi Kleen [this message]
2004-02-23  7:26 ` [PATCH] Increase snd/rcv buffers in pppoe David S. Miller
2004-02-23 10:53   ` Andi Kleen
2004-02-23 11:01     ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-23 11:16       ` Andi Kleen
2004-02-23 11:38         ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-23 18:26           ` David S. Miller
2004-02-23 20:12             ` Andi Kleen
2004-02-23 21:32               ` David S. Miller
2004-02-26 19:49                 ` Andi Kleen
2004-02-26 20:42                   ` David S. Miller
2004-02-26 20:52                     ` Andi Kleen
2004-02-26 22:03                       ` Andi Kleen
2004-02-26 22:22                         ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040222234750.GA78924@colin2.muc.de \
    --to=ak@muc.de \
    --cc=mostrows@styx.uwaterloo.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).