netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/4] net: uninline netif_rx_reschedule
Date: Thu, 14 Dec 2006 12:48:16 -0800	[thread overview]
Message-ID: <20061214204900.888889000@osdl.org> (raw)
In-Reply-To: 20061214204814.631279000@osdl.org

[-- Attachment #1: netif_rx_reschedule.patch --]
[-- Type: text/plain, Size: 1638 bytes --]

Move netif_rx_reschedule out of line, so that softnet_data can be
made local.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>


--- linux-2.6.20-rc1.orig/include/linux/netdevice.h
+++ linux-2.6.20-rc1/include/linux/netdevice.h
@@ -851,21 +851,7 @@ static inline void netif_rx_schedule(str
 /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete().
  * Do not inline this?
  */
-static inline int netif_rx_reschedule(struct net_device *dev, int undo)
-{
-	if (netif_rx_schedule_prep(dev)) {
-		unsigned long flags;
-
-		dev->quota += undo;
-
-		local_irq_save(flags);
-		list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
-		__raise_softirq_irqoff(NET_RX_SOFTIRQ);
-		local_irq_restore(flags);
-		return 1;
-	}
-	return 0;
-}
+extern int netif_rx_reschedule(struct net_device *dev, int undo);
 
 /* Remove interface from poll list: it must be in the poll list
  * on current cpu. This primitive is called by dev->poll(), when
--- linux-2.6.20-rc1.orig/net/core/dev.c
+++ linux-2.6.20-rc1/net/core/dev.c
@@ -1132,6 +1132,23 @@ void __netif_rx_schedule(struct net_devi
 }
 EXPORT_SYMBOL(__netif_rx_schedule);
 
+int netif_rx_reschedule(struct net_device *dev, int undo)
+{
+	if (netif_rx_schedule_prep(dev)) {
+		unsigned long flags;
+
+		dev->quota += undo;
+
+		local_irq_save(flags);
+		list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
+		__raise_softirq_irqoff(NET_RX_SOFTIRQ);
+		local_irq_restore(flags);
+		return 1;
+	}
+	return 0;
+}
+EXPORT_SYMBOL(netif_rx_reschedule);
+
 void dev_kfree_skb_any(struct sk_buff *skb)
 {
 	if (in_irq() || irqs_disabled())

-- 


  parent reply	other threads:[~2006-12-14 20:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 20:48 [PATCH 0/4] network device interface cleanups Stephen Hemminger
2006-12-14 20:48 ` [PATCH 1/4] net: make dev_kfree_skb_irq not inline Stephen Hemminger
2006-12-14 22:30   ` Christoph Hellwig
2006-12-14 22:34     ` Stephen Hemminger
2006-12-14 23:00     ` David Miller
2006-12-14 20:48 ` Stephen Hemminger [this message]
2006-12-14 20:48 ` [PATCH 3/4] net: move softnet_data Stephen Hemminger
2006-12-20 18:39   ` David Miller
2006-12-14 20:48 ` [PATCH 4/4] net: rearrange functions in netdevice.h Stephen Hemminger

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=20061214204900.888889000@osdl.org \
    --to=shemminger@osdl.org \
    --cc=davem@davemloft.net \
    --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).