[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46A7FEFC.4040005@pobox.com>
Date: Wed, 25 Jul 2007 21:55:08 -0400
From: Jeff Garzik <jgarzik@...ox.com>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
hadi@...erus.ca, rusty@...tcorp.com.au
Subject: Re: [PATCH RFC]: napi_struct V4
Stephen Hemminger wrote:
> The usage of NAPI on 8139cp and 8139too seems dodgy;
> these drivers expect this to work:
>
> local_irq_save(flags);
> cpw16_f(IntrMask, cp_intr_mask);
> __netif_rx_complete(dev);
> local_irq_restore(flags);
>
> It works on SMP only because if poll races with IRQ,
> the IRQ is not masked or cleared so the IRQ will get restarted.
Expect? This _does_ work on both UP and SMP.
> Better would be to change it to:
> spin_lock_irqsave(&cp->lock, flags);
> cpw16_f(IntrMask, cp_intr_mask);
> __netif_rx_complete(dev);
> spin_unlock_irqrestore(&cp->lock, flags);
>
> Which actually is same code on UP.
I'm missing your point?
You claim local_irq_save() works only on SMP, then suggest a solution
that you agree produces the same result?
I don't see any logic to your request, only added overhead for no reason.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists