[ipxe-devel] [iPXE-devel] [PATCHv2 4/6] [core] Keep scheduling while shell banner waiting

Michael Brown mbrown at fensystems.co.uk
Wed Jul 14 23:30:31 UTC 2010


On Wednesday 14 Jul 2010 20:14:48 Piotr Jaroszyński wrote:
> > <snip>
> >
> > You can then call activity_start() and activity_stop() at appropriate
> > places (e.g. on creating/freeing a TCP connection or a TFTP connection;
> > UDP-based protocols such as TFTP could also potentially benefit from
> > waiting for a graceful shutdown).  You can call activity_wait() from
> > appropriate places such as immediately prior to imgexec() in
> > usr/autoboot.c.
> 
> One of those places would have to be in ifclose then, no? I like the
> idea because it's more general, but on the other hand we might end up
> with activity_wait in some places where we don't always need it (like
> ifclosing a different interface than the one used by the activity).
> Maybe it's not such a big deal though.

ifclose() is conceptually separate from netdev_close(), in that ifclose() 
represents a "user level" call that is allowed to call things like printf() 
and step().  It would in that sense be acceptable for ifclose() to call 
activity_wait() before calling netdev_close().

That said, you could argue that ifclose is equivalent to something like 
"ifconfig eth0 down" which would, I think, cause connections to terminate 
gracelessly in exactly the same way as currently happens with iPXE.  Maybe 
usr/autoboot.c is the more natural place to fit calls to activity_wait()?

Michael




More information about the ipxe-devel mailing list