summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini-list@gnudd.com>2009-08-07 13:59:16 +0200
committerBen Warren <biggerbadderben@gmail.com>2009-08-25 13:35:54 -0700
commitbd931ca61c84039241d438ade4a9755ae0e5372f (patch)
treec1ce4b80189ccb3208f842f4d83edd0e9b59ab44 /net
parent89ba81d1079a07b8430a98c1746c6d411312eb0d (diff)
nfs: accept CONFIG_NFS_READ_SIZE from config file
To take advantage of defragmented packets, the config file can define CONFIG_NFS_READ_SIZE to override the 1kB default. No support is there for an environment variable by now. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/nfs.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/nfs.h b/net/nfs.h
index 712afa089aa..de8a0c64c07 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -38,8 +38,14 @@
/* Block size used for NFS read accesses. A RPC reply packet (including all
* headers) must fit within a single Ethernet frame to avoid fragmentation.
- * Chosen to be a power of two, as most NFS servers are optimized for this. */
-#define NFS_READ_SIZE 1024
+ * However, if CONFIG_IP_DEFRAG is set, the config file may want to use a
+ * bigger value. In any case, most NFS servers are optimized for a power of 2.
+ */
+#ifdef CONFIG_NFS_READ_SIZE
+#define NFS_READ_SIZE CONFIG_NFS_READ_SIZE
+#else
+#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */
+#endif
#define NFS_MAXLINKDEPTH 16