[U-Boot] NetConsole and network API

RaúlSánchez Siles rsanchezs at infoglobal.es
Fri Oct 22 09:30:56 CEST 2010


  Hello:

Stefano Babic <sbabic <at> denx.de> writes:

> 
> Hi all,
> 
> I have seen an issue using netconsole and I am asking myself if there is
> a problem in the actual concept of a network interface in u-boot.
> 
> I admit soon I have not used a "normal" network controller, but I ran
> NetConsole on Ethernet over USB. However, I have checked with other
> network drivers  (smc9111.c, for example) and I can imagine there are
> similar problems.
> 
> The assumption we have is that any network command is atomic.
> Any network command initializes the interface, uses it (eth_send(), ..)
> and at the end deactivates the interface (eth_halt()). This makes an
> application as netconsole simply unusable, because it is not thinkable
> that after any message the interface is put in a down state. Not only,
> it makes impossible to use network commands as TFTP inside netconsole,
> because they try to initialize the same interface that netconsole uses.
> 
> Of course, in my case things get even worse. After any network command,
> the eth_halt() callback is called, making the interface disappearing on
> the host side. And any time the host starts to enumerate again the
> interface, setting MAC, etc.....
> 
> Well, I have fixed this issue avoiding the interface is initialized or
> stopped after each command, but it seems this is a general problem. I
> see in other drivers that the phy is set or stop after each command, and
> this should generate the same problems I noted with USB.
> 
> My main question to the ML is, independently from the particular problem
> on my target, if we should change the actual concept. For example, if we
> provide to stop all devices only before booting an OS, but leaving them
> alive after the first initialization. I understand that this generate
> other issues (as u-boot cannot recognize that a cable was removed and
> inserted again), but it makes the system usable in other circumstances.
> 
> Any thought about this ?
> 
> Best regards,
> Stefano Babic
> 

  IMHO, this analisys, I share, leaves to the same conclussion: there's a
network redesign need.

  The problem, as Wolgang suggested on IRC, is that there's no active network
custodian currently, which makes things like this hard to discuss and
implement.

  By the way, have you had further advances on this topic? I'd like to hear
about what I can expect from your netconsole fix. Is it working? Does it allow
concurrent other network services usage (like TFTP)? Any major draback?

  Thanks and regards,

-- 
Raúl Sánchez Siles



More information about the U-Boot mailing list