Skip to content
Snippets Groups Projects
Commit aa7a6487 authored by Joe Hershberger's avatar Joe Hershberger
Browse files

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: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent c98b171e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment