On Wed, Sep 07, 2005 at 12:17:01PM -0700, Ben Greear wrote:
> Francois Romieu wrote:
> >Stephen Hemminger <[EMAIL PROTECTED]> :
> >[...]
> >
> >>It really sounds like netconsole needs to have a different device hook
> >>instead of start_xmit.  It also probably doesn't want to have allocate
> >>an skb.  What you want is a synchronous way to send one packet with
> >>interrupts disabled:
> >>
> >>    (dev->netpoll_send)(dev, packet, len)
> >
> >
> >I do not see how it will solve the issue raised by David:
> >
> >hard_start_xmit does not disable irq and takes nearly no lock,
> >thus it can be interrupted if a random irq event happens on a
> >different device. Assume that the driver of the said different
> >device issues a printk through netconsole and the game is over.
> >
> >Without extra locking, netpoll_send can not know that the
> >interrupted hard_start_xmit has left the device/driver in a sane
> >state.
> 
> You could do some horrible kludge like make netpoll register itself
> as active and then enable locking in both netpoll_send and hard_start_xmit.

We can probably get away with something much lighter weight, as we
only need to exclude netpoll from calling into the driver when it's
already doing softirq processing. There's almost but not quite enough
info for this already in the network scheduling flags.

-- 
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to