From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, netdev@oss.sgi.com
Subject: Re: [Fwd: [RFT] NAPI for 8139too]
Date: Sat, 18 Oct 2003 21:56:20 +0900 [thread overview]
Message-ID: <873cdqbt6z.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <3F9070B6.9090306@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]
Hi,
I also working for it (patches attached). So I have several comment.
Jeff Garzik <jgarzik@pobox.com> writes:
> + dev->weight = 16;
just question: Is there basis for believing that this value is
rightness? Although I use 64, I don't have a reason for having chosen
it at all.
> dev->stop = rtl8139_close;
> dev->get_stats = rtl8139_get_stats;
> dev->set_multicast_list = rtl8139_set_rx_mode;
> @@ -1879,24 +1877,28 @@
> #endif
> }
>
> -static void rtl8139_rx_interrupt (struct net_device *dev,
> - struct rtl8139_private *tp, void *ioaddr)
> +/*
> + * NAPI poll routine.
> + */
> +static int rtl8139_poll(struct net_device *dev, int *budget)
> {
> + struct rtl8139_private *tp = dev->priv;
> + void *ioaddr = tp->mmio_addr;
> unsigned char *rx_ring;
> u16 cur_rx;
> + int rx, status;
> + unsigned long flags;
>
> - assert (dev != NULL);
> - assert (tp != NULL);
> - assert (ioaddr != NULL);
> -
> + spin_lock_irqsave(&tp->lock, flags);
I don't think lock of interrupt related path needed here. And this
thinks that it has a bad influence on TX path.
Instead of it, I think we need synchronize with ->tx_timeout because
->tx_timeout touch IntrMask.
> + rescan:
> rx_ring = tp->rx_ring;
> cur_rx = tp->cur_rx;
> -
[...]
> RTL_W16_F (IntrStatus, RxAckBits);
> +
> + if (++rx >= dev->quota)
Shouldn't we use "min(dev->quota, *budget)" for this limit? Users can
change "budget" via sysctl.
> + /* If received interrupt, then disable furthur interrupts
> + * and enable NAPI polling.
> + */
> + if (netif_running (dev) && (status & RxAckBits)) {
> + /* disable more receive interrupts */
> + RTL_W16 (IntrMask, rtl8139_intr_mask & ~RxAckBits);
> + netif_rx_schedule(dev);
> + }
This style have problem on shutdowning interface path. Please see
8139too-napi-stop-fix.patch.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
[-- Attachment #2: 8139too.tar.gz --]
[-- Type: application/octet-stream, Size: 5335 bytes --]
next parent reply other threads:[~2003-10-18 12:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F9070B6.9090306@pobox.com>
2003-10-18 12:56 ` OGAWA Hirofumi [this message]
2003-10-20 15:41 ` [Fwd: [RFT] NAPI for 8139too] Stephen Hemminger
2003-10-20 20:11 ` [RFT] merged 8139too NAPI Stephen Hemminger
2003-10-21 13:35 ` OGAWA Hirofumi
2003-10-28 19:47 ` [PATCH] Updated 8139too with NAPI Stephen Hemminger
2003-10-29 19:34 ` Jeff Garzik
2003-10-30 17:12 ` OGAWA Hirofumi
[not found] ` <20031030104943.20b61af0.shemminger@osdl.org>
[not found] ` <87ekwu9tn4.fsf@devron.myhome.or.jp>
2003-11-11 22:31 ` Stephen Hemminger
2003-11-12 0:20 ` Jeff Garzik
2003-11-12 15:41 ` OGAWA Hirofumi
2003-11-12 16:01 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873cdqbt6z.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.