summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2016-08-15 14:42:15 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2016-08-22 14:20:08 -0500
commitaa7a648747d8c704a9a81c9e493d386930724e9d (patch)
tree74951256afa100bf2de9ffa4315943afa9f841d2 /net
parentc98b171e1098f94b2ff7720c45a25a602882f876 (diff)
downloadu-boot-aa7a648747d8c704a9a81c9e493d386930724e9d.tar.gz
u-boot-aa7a648747d8c704a9a81c9e493d386930724e9d.tar.xz
u-boot-aa7a648747d8c704a9a81c9e493d386930724e9d.zip
net: Stop including NFS overhead in defragment max
At least on bfin, this "specimen" is actually allocated in the BSS and wastes lots of memory in already tight memory conditions. Also, with the introduction of NFSv3 support, this waste got substantially larger. Just remove it. If a board needs a specific different defragment size, that board can override this setting. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/net.c b/net/net.c
index 1e1d23dafa..671d45dd83 100644
--- a/net/net.c
+++ b/net/net.c
@@ -834,15 +834,7 @@ int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, int sport,
#ifndef CONFIG_NET_MAXDEFRAG
#define CONFIG_NET_MAXDEFRAG 16384
#endif
-/*
- * MAXDEFRAG, above, is chosen in the config file and is real data
- * so we need to add the NFS overhead, which is more than TFTP.
- * To use sizeof in the internal unnamed structures, we need a real
- * instance (can't do "sizeof(struct rpc_t.u.reply))", unfortunately).
- * The compiler doesn't complain nor allocates the actual structure
- */
-static struct rpc_t rpc_specimen;
-#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG + sizeof(rpc_specimen.u.reply))
+#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG)
#define IP_MAXUDP (IP_PKTSIZE - IP_HDR_SIZE)