[U-Boot] netloop: speed up NetLoop

Mike Frysinger vapier at gentoo.org
Tue Feb 24 21:54:06 CET 2009


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

> +	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 ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090224/bc67484c/attachment.pgp 


More information about the U-Boot mailing list