netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Increase snd/rcv buffers in pppoe
@ 2004-02-22 23:47 Andi Kleen
  2004-02-23  7:26 ` David S. Miller
  0 siblings, 1 reply; 14+ messages in thread
From: Andi Kleen @ 2004-02-22 23:47 UTC (permalink / raw)
  To: netdev; +Cc: mostrows


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;

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-02-26 22:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-22 23:47 [PATCH] Increase snd/rcv buffers in pppoe Andi Kleen
2004-02-23  7:26 ` 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

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).