Commit bd931ca6 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Ben Warren

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: default avatarAlessandro Rubini <rubini@gnudd.com>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent 89ba81d1
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment