From: "David S. Miller" <davem@davemloft.net>
To: mchan@broadcom.com
Cc: akepner@sgi.com, netdev@oss.sgi.com
Subject: Re: Perf data with recent tg3 patches
Date: Fri, 13 May 2005 22:20:07 -0700 (PDT) [thread overview]
Message-ID: <20050513.222007.78719997.davem@davemloft.net> (raw)
In-Reply-To: <1116031159.6214.8.camel@rh4>
From: "Michael Chan" <mchan@broadcom.com>
Subject: Re: Perf data with recent tg3 patches
Date: Fri, 13 May 2005 17:39:19 -0700
> I like this. I think it will work well.
Here is a quick patch which implements this.
--- 1/drivers/net/tg3.c.~1~ 2005-05-13 22:13:02.000000000 -0700
+++ 2/drivers/net/tg3.c 2005-05-13 22:18:03.000000000 -0700
@@ -2869,9 +2869,6 @@ static int tg3_poll(struct net_device *n
spin_lock_irqsave(&tp->lock, flags);
- if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
- tp->last_tag = sblk->status_tag;
-
/* handle link change and other phy events */
if (!(tp->tg3_flags &
(TG3_FLAG_USE_LINKCHG_REG |
@@ -2896,7 +2893,6 @@ static int tg3_poll(struct net_device *n
* All RX "locking" is done by ensuring outside
* code synchronizes with dev->poll()
*/
- done = 1;
if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) {
int orig_budget = *budget;
int work_done;
@@ -2908,12 +2904,14 @@ static int tg3_poll(struct net_device *n
*budget -= work_done;
netdev->quota -= work_done;
-
- if (work_done >= orig_budget)
- done = 0;
}
+ if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
+ tp->last_tag = sblk->status_tag;
+ rmb();
+
/* if no more work, tell net stack and NIC we're done */
+ done = !tg3_has_work(tp);
if (done) {
spin_lock_irqsave(&tp->lock, flags);
__netif_rx_complete(netdev);
next prev parent reply other threads:[~2005-05-14 5:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 2:49 Perf data with recent tg3 patches Arthur Kepner
[not found] ` <20050512.211935.67881321.davem@davemloft.net>
2005-05-13 23:57 ` Arthur Kepner
2005-05-14 0:50 ` David S. Miller
2005-05-14 0:39 ` Michael Chan
2005-05-14 5:20 ` David S. Miller [this message]
2005-05-20 21:52 ` Arthur Kepner
2005-05-20 22:33 ` David S. Miller
2005-05-20 22:52 ` Rick Jones
2005-05-20 22:54 ` Arthur Kepner
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=20050513.222007.78719997.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akepner@sgi.com \
--cc=mchan@broadcom.com \
--cc=netdev@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).