From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org
Cc: Jeff Garzik <jgarzik@pobox.com>,
David Miller <davem@davemloft.net>,
Joe Eykholt <jre@nuovasystems.com>,
Jay Vosburgh <fubar@us.ibm.com>
Subject: [PATCH 3/5] net/core: Uninline skb_bond().
Date: Wed, 2 Jul 2008 18:22:00 -0700 [thread overview]
Message-ID: <12150481262025-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <1215048125108-git-send-email-fubar@us.ibm.com>
From: Joe Eykholt <jre@nuovasystems.com>
Otherwise subsequent changes need multiple return values.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
net/core/dev.c | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index f6944ec..78114f6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1872,22 +1872,6 @@ int netif_rx_ni(struct sk_buff *skb)
EXPORT_SYMBOL(netif_rx_ni);
-static inline struct net_device *skb_bond(struct sk_buff *skb)
-{
- struct net_device *dev = skb->dev;
-
- if (dev->master) {
- if (skb_bond_should_drop(skb)) {
- kfree_skb(skb);
- return NULL;
- }
- skb->dev = dev->master;
- }
-
- return dev;
-}
-
-
static void net_tx_action(struct softirq_action *h)
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
@@ -2092,10 +2076,14 @@ int netif_receive_skb(struct sk_buff *skb)
if (!skb->iif)
skb->iif = skb->dev->ifindex;
- orig_dev = skb_bond(skb);
-
- if (!orig_dev)
- return NET_RX_DROP;
+ orig_dev = skb->dev;
+ if (orig_dev->master) {
+ if (skb_bond_should_drop(skb)) {
+ kfree_skb(skb);
+ return NET_RX_DROP;
+ }
+ skb->dev = orig_dev->master;
+ }
__get_cpu_var(netdev_rx_stat).total++;
--
1.5.2.4
next prev parent reply other threads:[~2008-07-03 1:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 1:21 [PATCH net-next-2.6 0/5] bonding: Refactor, fix, and updates Jay Vosburgh
2008-07-03 1:21 ` [PATCH 1/5] bonding: refactor mii monitor Jay Vosburgh
2008-07-03 1:21 ` [PATCH 2/5] bonding: Don't destroy bonding master when removing slave via sysfs Jay Vosburgh
2008-07-03 1:22 ` Jay Vosburgh [this message]
2008-07-03 1:22 ` [PATCH 4/5] net/core: Allow certain receives on inactive slave Jay Vosburgh
2008-07-03 1:22 ` [PATCH 5/5] net/core: Allow receive on active slaves Jay Vosburgh
2008-07-04 12:45 ` Jeff Garzik
2008-07-06 4:12 ` David Miller
2008-07-06 4:36 ` Joe Eykholt
2008-07-06 4:38 ` David Miller
2008-07-20 4:20 ` Joe Eykholt
2008-08-07 8:00 ` [PATCH 1/5] bonding: refactor mii monitor Jeff Garzik
2008-08-06 22:49 ` [PATCH net-next-2.6 0/5] bonding: Refactor, fix, and updates Jay Vosburgh
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=12150481262025-git-send-email-fubar@us.ibm.com \
--to=fubar@us.ibm.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=jre@nuovasystems.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).