[U-Boot-Users] RE: Ethernet loopback command
thomas.schaefer at kontron.com
Tue Mar 8 15:28:57 CET 2005
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sorry, but I reject this patch. Test functions like this one
> should be added as part of the existing POST framework
> (which probably needs to be extended for better architecture
> support; see the archives for the previous discussions about this).
I actually planned to introduce a FE loopback test in the POST framework. But the functions provided seemed to be necessary, because generation and receipt of packets is basic for loopback tests.
> > new ethernet packet type (PROT_TEST, 0x0808, AFAIK this is not used
> > otherwise) is introduced in net/net.c.
> > The patch is against SF CVS from 20050307.
> I also don't understand why specific ethernet packet types
> must be invented. I don't like such non-standard solutions.
The PROT_IP part of the NetReceive function examines the complete IP header which is not necessary here. I introduced that packet type to achieve a proper separtion from all other packet types. Normally the generated packet would remain on the board because PHY or EMAC are switched into loopback mode, but i agree that those non-standard packets could be problematic when sent to a network.
> isn't. Actually I don;t see which additional information
> you can get from this test that cannot be gotten from
> existing network code like ping.
You would need a station responding to the ping, which would be difficult during POST. With improved packet generation (large packets, Mbytes of data), stressing the FE subsystem could be achieved.
> Also, the code is not completely configurable, and was
> obviously not well tested. You add some variables even in
> case the command is not cnfigured, which wastes memory and
> causes compiler warnings.
My fault. Should be more careful next time...
More information about the U-Boot