From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 25 Feb 2009 08:46:49 +0100 Subject: [U-Boot] netloop: speed up NetLoop In-Reply-To: <200902241554.07212.vapier@gentoo.org> References: <49913D1C.6090905@denx.de> <200902241554.07212.vapier@gentoo.org> Message-ID: <49A4F769.7010300@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Mike, Mike Frysinger wrote: > On Tuesday 10 February 2009 03:38:52 Heiko Schocher wrote: >> +int NetInitLoop(proto_t protocol) > > and some comments not really specific to your code ... > >> + switch (protocol) { >> +#if defined(CONFIG_CMD_NFS) >> + case NFS: >> +#endif >> + case NETCONS: >> + case TFTP: >> + NetServerIP = getenv_IPaddr ("serverip"); >> + break; >> +#if defined(CONFIG_CMD_PING) >> + case PING: >> + /* nothing */ >> + break; >> +#endif >> +#if defined(CONFIG_CMD_SNTP) >> + case SNTP: >> + /* nothing */ >> + break; >> +#endif >> + default: >> + break; >> + } > > am i missing something, or are the PING/SNTP parts here completely useless Yes, seems so, but I am not a net expert ... but I think it is not needed, so I fix this too when I am fixing the other issues you mentioned. >> + case BOOTP: >> + case RARP: >> + /* >> + * initialize our IP addr to 0 in order to accept ANY >> + * IP addr assigned to us by the BOOTP / RARP server >> + */ >> + NetOurIP = 0; >> + NetServerIP = getenv_IPaddr ("serverip"); >> + NetOurVLAN = getenv_VLAN("vlan"); /* VLANs must be read */ >> + NetOurNativeVLAN = getenv_VLAN("nvlan"); >> + case CDP: >> + NetOurVLAN = getenv_VLAN("vlan"); /* VLANs must be read */ >> + NetOurNativeVLAN = getenv_VLAN("nvlan"); >> + break; > > looks to me like BOOTP/RARP are pointlessly reading/setting NetOurVLAN and > NetOurNativeVLAN twice ... Yep, I fix this also. thanks Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany