X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=net%2Fnfs.h;h=53451dbd17c46b3a26a10fa855f85d1a6f9a86a1;hb=93d520ff7d4b6c6227f09e63b674c94c92485efe;hp=ebd4266857fd07b4435f1200bfe52b99484ea4d6;hpb=cbd8a35c6dbaaca35494cbec319960887ad02dcf;p=oweals%2Fu-boot.git diff --git a/net/nfs.h b/net/nfs.h index ebd4266857..53451dbd17 100644 --- a/net/nfs.h +++ b/net/nfs.h @@ -1,10 +1,7 @@ /* * (C) Masami Komiya 2004 * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, or (at - * your option) any later version. + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __NFS_H__ @@ -38,8 +35,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 @@ -62,11 +65,11 @@ struct rpc_t { uint32_t verifier; uint32_t v2; uint32_t astatus; - uint32_t data[1]; + uint32_t data[19]; } reply; } u; }; -extern void NfsStart (void); /* Begin NFS */ +extern void NfsStart(void); /* Begin NFS */ /**********************************************************************/