patch-2.4.26 linux-2.4.26/net/core/sock.c
Next file: linux-2.4.26/net/ipv4/arp.c
Previous file: linux-2.4.26/net/core/dev.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
2004-04-14 06:05:41.000000000 -0700
- Orig file:
linux-2.4.25/net/core/sock.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.25/net/core/sock.c linux-2.4.26/net/core/sock.c
@@ -128,6 +128,16 @@
#include <net/tcp.h>
#endif
+/* Take into consideration the size of the struct sk_buff overhead in the
+ * determination of these values, since that is non-constant across
+ * platforms. This makes socket queueing behavior and performance
+ * not depend upon such differences.
+ */
+#define _SK_MEM_PACKETS 256
+#define _SK_MEM_OVERHEAD (sizeof(struct sk_buff) + 256)
+#define SK_WMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
+#define SK_RMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
+
/* Run time adjustable parameters. */
__u32 sysctl_wmem_max = SK_WMEM_MAX;
__u32 sysctl_rmem_max = SK_RMEM_MAX;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)