]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/nfs.h
nfs: accept CONFIG_NFS_READ_SIZE from config file
[people/ms/u-boot.git] / net / nfs.h
index ebd4266857fd07b4435f1200bfe52b99484ea4d6..de8a0c64c07ce0b3fe6fff5ea86559b32e6ef005 100644 (file)
--- a/net/nfs.h
+++ b/net/nfs.h
 
 /* 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
 
@@ -62,7 +68,7 @@ struct rpc_t {
                        uint32_t verifier;
                        uint32_t v2;
                        uint32_t astatus;
-                       uint32_t data[1];
+                       uint32_t data[19];
                } reply;
        } u;
 };