On Fri, Apr 29, 2005 at 11:51:48AM +0200, Tommy Christensen wrote:
>
> Originally, I was afraid it could get too trigger happy, so I left
> this idea. Perhaps that's not such a big deal afterall.
Even if it does flap we've still got the built-in one second
flap-protection of link_watch.
> How does this look?
Much better :)
> @@ -74,6 +75,12 @@
> clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state);
>
> if (dev->flags & IFF_UP) {
> + if (netif_carrier_ok(dev)) {
> + if (dev->qdisc_sleeping != &noop_qdisc)
> + dev_activate(dev);
I don't see how qdisc_sleeping can be noop_qdisc unless there is a bug.
So why not convert this to a BUG_ON?
> diff -ru linux-2.6.12-rc3/net/sched/sch_generic.c
> linux-2.6.12-work/net/sched/sch_generic.c
> --- linux-2.6.12-rc3/net/sched/sch_generic.c 2005-03-04 09:55:44.000000000
> +0100
> +++ linux-2.6.12-work/net/sched/sch_generic.c 2005-04-29 11:22:05.420250195
> +0200
> @@ -539,6 +539,10 @@
> write_unlock_bh(&qdisc_tree_lock);
> }
>
> + if (!netif_carrier_ok(dev) && netif_queue_stopped(dev))
> + /* Delay activation until next carrier-on event */
> + return;
How about moving this check into dev_open?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|