netdev
[Top] [All Lists]

Re: [PATCH] Updated 8139too with NAPI

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] Updated 8139too with NAPI
From: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Nov 2003 00:41:34 +0900
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20031111143143.794909e8.shemminger@osdl.org>
References: <3F9070B6.9090306@pobox.com> <873cdqbt6z.fsf@devron.myhome.or.jp> <20031020131106.6862e951.shemminger@osdl.org> <877k2ysohc.fsf@devron.myhome.or.jp> <20031028114707.1d234da6.shemminger@osdl.org> <3FA01629.2080202@pobox.com> <873cdaabue.fsf@devron.myhome.or.jp> <20031030104943.20b61af0.shemminger@osdl.org> <87ekwu9tn4.fsf@devron.myhome.or.jp> <20031111143143.794909e8.shemminger@osdl.org>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
Stephen Hemminger <shemminger@xxxxxxxx> writes:

> @@ -1663,6 +1678,8 @@
>       /* Disable interrupts by clearing the interrupt mask. */
>       RTL_W16 (IntrMask, 0x0000);
>  
> +     __netif_poll_disable(dev);

Rx-poll can enable interrupt. However, because it can happen on SMP
only, then reset of chips should be done sooner or later, so I don't
care so much.

> +             /*
> +              * This order is important
> +              * (see Documentation/networking/NAPI_HOWTO.txt)
> +              */
> +             netif_rx_complete(dev);
> +             RTL_W16_F(IntrMask, rtl8139_intr_mask);

    netif_rx_complete(dev);
    -- interrupted --
        in rtl8139_interrupt(),
                if (netif_rx_schedule_prep(dev)) {
                        RTL_W16_F (IntrMask, rtl8139_norx_intr_mask);
                        __netif_rx_schedule (dev);
                }
    -- resume --
    /* enable interrupt, but rx-poll is already scheduling */
    RTL_W16_F(IntrMask, rtl8139_intr_mask);

So doesn't disable interrupt. Umm... this problem was things that my
patch fixed. Any objections?

                local_irq_disable();
                __netif_rx_complete(dev);
                RTL_W16_F(IntrMask, rtl8139_intr_mask);
                local_irq_enable();
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>