From: linas@austin.ibm.com (Linas Vepstas)
To: Jeff Garzik <jgarzik@pobox.com>
Cc: cbe-oss-dev@ozlabs.org, netdev@vger.kernel.org
Subject: [PATCH 15/18] spidernet: minor RX optimization
Date: Thu, 7 Jun 2007 14:55:08 -0500 [thread overview]
Message-ID: <20070607195508.GO16077@austin.ibm.com> (raw)
In-Reply-To: <20070607191707.GA7904@austin.ibm.com>
A minor optimization on the RX side is that the hardware does
not need to be kicked if space did not open up in the RX ring.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
drivers/net/spider_net.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6.22-rc1/drivers/net/spider_net.c
===================================================================
--- linux-2.6.22-rc1.orig/drivers/net/spider_net.c 2007-06-07 11:56:10.000000000 -0500
+++ linux-2.6.22-rc1/drivers/net/spider_net.c 2007-06-07 11:56:23.000000000 -0500
@@ -525,6 +525,7 @@ spider_net_refill_rx_chain(struct spider
{
struct spider_net_descr_chain *chain = &card->rx_chain;
unsigned long flags;
+ int cnt = 0;
/* one context doing the refill (and a second context seeing that
* and omitting it) is ok. If called by NAPI, we'll be called again
@@ -538,9 +539,13 @@ spider_net_refill_rx_chain(struct spider
if (spider_net_prepare_rx_descr(card, chain->head))
break;
chain->head = chain->head->next;
+ cnt ++;
}
spin_unlock_irqrestore(&chain->lock, flags);
+
+ if (cnt)
+ spider_net_enable_rxdmac(card);
}
/**
@@ -573,7 +578,6 @@ spider_net_alloc_rx_skbs(struct spider_n
/* This will allocate the rest of the rx buffers;
* if not, it's business as usual later on. */
spider_net_refill_rx_chain(card);
- spider_net_enable_rxdmac(card);
return 0;
error:
@@ -1305,7 +1309,6 @@ spider_net_poll(struct net_device *netde
netdev->quota -= packets_done;
*budget -= packets_done;
spider_net_refill_rx_chain(card);
- spider_net_enable_rxdmac(card);
spider_net_cleanup_tx_ring(card);
@@ -1590,7 +1593,6 @@ spider_net_handle_error_irq(struct spide
card->ignore_rx_ramfull = 1;
spider_net_resync_head_ptr(card);
spider_net_refill_rx_chain(card);
- spider_net_enable_rxdmac(card);
card->num_rx_ints ++;
netif_rx_schedule(card->netdev);
}
@@ -1611,7 +1613,6 @@ spider_net_handle_error_irq(struct spide
/* Could happen when rx chain is full */
spider_net_resync_head_ptr(card);
spider_net_refill_rx_chain(card);
- spider_net_enable_rxdmac(card);
card->num_rx_ints ++;
netif_rx_schedule(card->netdev);
show_error = 0;
@@ -1625,7 +1626,6 @@ spider_net_handle_error_irq(struct spide
/* Could happen when rx chain is full */
spider_net_resync_head_ptr(card);
spider_net_refill_rx_chain(card);
- spider_net_enable_rxdmac(card);
card->num_rx_ints ++;
netif_rx_schedule(card->netdev);
show_error = 0;
next prev parent reply other threads:[~2007-06-07 19:55 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 19:17 [PATCH 0/18] spidernet driver bug fixes Linas Vepstas
2007-06-07 19:20 ` [PATCH 1/18] spidernet: skb used after netif_receive_skb Linas Vepstas
2007-06-07 19:22 ` [PATCH 2/18] spidernet: checksum and ethtool Linas Vepstas
2007-06-07 19:24 ` [PATCH 3/18] spidernet: beautify error messages Linas Vepstas
2007-06-07 19:25 ` [PATCH 4/18] spidernet: move a block of code around Linas Vepstas
2007-06-07 19:27 ` [PATCH 5/18] spidernet: zero out a pointer Linas Vepstas
2007-06-07 19:29 ` [PATCH 6/18] spidernet: null out skb pointer after its been used Linas Vepstas
2007-06-07 19:33 ` [PATCH 7/18] spidernet: Don't terminate the RX ring Linas Vepstas
2007-06-07 19:35 ` [PATCH 8/18] spidernet: enhance the dump routine Linas Vepstas
2007-06-07 19:39 ` [PATCH 9/18] spidernet: reset the card when an rxramfull is seen Linas Vepstas
2007-06-07 19:41 ` [PATCH 10/18] spidernet: service TX later Linas Vepstas
2007-06-07 19:43 ` [PATCH 11/18] spidernet: increase the NAPI weight Linas Vepstas
2007-06-07 19:45 ` [PATCH 12/18] spidernet: don't flag rare packets as bad packets Linas Vepstas
2007-06-07 19:51 ` [PATCH 13/18] spidernet: Cure RX ram full bug Linas Vepstas
2007-06-07 19:53 ` [PATCH 14/18] spidernet: silence the ramfull messages Linas Vepstas
2007-06-07 19:55 ` Linas Vepstas [this message]
2007-06-07 19:57 ` [PATCH 16/18] spidernet: fix misnamed flag Linas Vepstas
2007-06-07 20:01 ` [PATCH 17/18] spidernet: turn off descriptor chain end interrupt Linas Vepstas
2007-06-07 20:05 ` [PATCH 18/18] spidernet: driver docmentation Linas Vepstas
2007-06-08 1:12 ` [Cbe-oss-dev] [PATCH 0/18] spidernet driver bug fixes Michael Ellerman
2007-06-08 17:06 ` Linas Vepstas
2007-06-08 17:20 ` Jeff Garzik
2007-06-11 18:14 ` [PATCH 0/15] " Linas Vepstas
2007-06-11 18:17 ` [PATCH 1/15] spidernet: null out skb pointer after its been used Linas Vepstas
2007-06-11 18:21 ` [PATCH 2/15] spidernet: Cure RX ram full bug Linas Vepstas
2007-06-11 18:23 ` [PATCH 3/15] spidernet: Don't terminate the RX ring Linas Vepstas
2007-06-11 18:26 ` [PATCH 4/15] spidernet: silence the ramfull messages Linas Vepstas
2007-06-13 20:12 ` Jeff Garzik
2007-06-14 22:29 ` Linas Vepstas
2007-06-14 23:12 ` [PATCH] spidernet: Replace literal with const Linas Vepstas
2007-07-02 12:37 ` Jeff Garzik
2007-06-11 18:29 ` [PATCH 5/15] spidernet: turn off descriptor chain end interrupt Linas Vepstas
2007-06-11 18:32 ` [PATCH 6/15] spidernet: skb used after netif_receive_skb Linas Vepstas
2007-06-11 18:35 ` [PATCH 7/15] spidernet: checksum and ethtool Linas Vepstas
2007-06-11 18:41 ` [PATCH 8/15] spidernet: beautify error messages Linas Vepstas
2007-06-13 20:15 ` Jeff Garzik
2007-06-11 18:48 ` [PATCH 9/15] spidernet: enhance the dump routine Linas Vepstas
2007-06-11 18:52 ` [PATCH 10/15] spidernet: invalidate unused pointer Linas Vepstas
2007-06-11 18:59 ` [PATCH 11/15] spidernet: service TX later Linas Vepstas
2007-06-11 19:02 ` [PATCH 12/15] spidernet: increase the NAPI weight Linas Vepstas
2007-06-13 20:14 ` Jeff Garzik
2007-06-13 20:49 ` [Cbe-oss-dev] " Arnd Bergmann
2007-06-14 22:08 ` Linas Vepstas
2007-06-11 19:05 ` [PATCH 13/15] spidernet: move a block of code around Linas Vepstas
2007-06-11 19:09 ` [PATCH 14/15] spidernet: fix misnamed flag Linas Vepstas
2007-06-11 19:12 ` [PATCH 15/15] spidernet: driver docmentation Linas Vepstas
2007-06-13 20:10 ` [PATCH 1/15] spidernet: null out skb pointer after its been used Jeff Garzik
2007-06-14 22:00 ` Linas Vepstas
2007-06-12 2:01 ` [PATCH 0/15] spidernet driver bug fixes Michael Ellerman
2007-06-12 23:00 ` Jeff Garzik
2007-06-12 23:32 ` Linas Vepstas
2007-06-13 0:04 ` Jeff Garzik
2007-06-13 16:14 ` Linas Vepstas
2007-06-13 18:51 ` Jeff Garzik
2007-06-13 19:01 ` [Cbe-oss-dev] " Segher Boessenkool
2007-06-13 19:02 ` Jeff Garzik
2007-06-13 20:52 ` Arnd Bergmann
2007-06-13 23:55 ` Michael Ellerman
2007-06-13 18:52 ` Jeff Garzik
2007-06-14 22:08 ` [Cbe-oss-dev] " David Woodhouse
2007-06-14 23:01 ` Jeff Garzik
2007-06-14 23:03 ` David Woodhouse
2007-06-14 23:04 ` Jeff Garzik
2007-06-14 23:07 ` David Woodhouse
2007-06-14 23:32 ` Michael Ellerman
2007-06-13 1:33 ` Michael Ellerman
2007-06-13 1:54 ` Jeff Garzik
2007-06-13 13:53 ` Michael Ellerman
2007-06-13 18:45 ` 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=20070607195508.GO16077@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.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 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).