From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andy Gospodarek <andy@greyhouse.net>
Cc: netdev@vger.kernel.org, fubar@us.ibm.com
Subject: Re: [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device
Date: Wed, 02 Dec 2009 06:13:15 +0100 [thread overview]
Message-ID: <4B15F76B.9040203@gmail.com> (raw)
In-Reply-To: <20091130201453.GF1639@gospo.rdu.redhat.com>
Andy Gospodarek a écrit :
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 5d131c2..eeee269 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2439,8 +2439,8 @@ int netif_receive_skb(struct sk_buff *skb)
> skb->skb_iif = skb->dev->ifindex;
>
> null_or_orig = NULL;
> - orig_dev = skb->dev;
> - if (orig_dev->master) {
> + orig_dev = __dev_get_by_index(dev_net(skb->dev),skb->skb_iif);
> + if (orig_dev->master && !(skb->dev->priv_flags & IFF_802_1Q_VLAN)) {
> if (skb_bond_should_drop(skb))
> null_or_orig = orig_dev; /* deliver only exact match */
> else
Please dont add a __dev_get_by_index() call in netif_receive_skb()
First, this is not safe against writers.
Second its very expensive on some setups.
Eventually, you could do something like :
Change prototypes of netif_receive_skb() to include the orig_dev in arguments.
Change vlan code to call __netif_receive_skb(skb, orig_dev)
instead of netif_received_skb(skb)
int __netif_receive_skb(struct sk_buff *skb, struct net_device *orig_dev)
{
...
if (!skb->skb_iif) {
skb->skb_iif = orig_dev->ifindex;
} else {
if (orig_dev->master && ...)
}
}
int netif_receive_skb(struct sk_buff *skb)
{
return __netif_receive_skb(skb, skb->dev);
}
next prev parent reply other threads:[~2009-12-02 5:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 20:14 [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device Andy Gospodarek
2009-11-30 20:22 ` Patrick McHardy
2009-11-30 20:53 ` Andy Gospodarek
2009-12-01 9:42 ` Patrick McHardy
2009-12-01 0:00 ` Jay Vosburgh
2009-12-01 1:21 ` Andy Gospodarek
2009-12-01 1:57 ` Jay Vosburgh
2009-12-01 14:44 ` Andy Gospodarek
2009-12-01 21:28 ` Jay Vosburgh
2009-12-01 23:07 ` Andy Gospodarek
2009-12-02 21:24 ` Andy Gospodarek
2009-12-07 18:13 ` Andy Gospodarek
2009-12-07 18:24 ` Eric Dumazet
2009-12-09 22:01 ` [PATCH net-next-2.6 v3] bonding: allow arp_ip_targets on separate vlans to use arp validation Andy Gospodarek
2009-12-11 5:17 ` Jay Vosburgh
2009-12-14 20:48 ` [PATCH net-next-2.6 v4] " Andy Gospodarek
2009-12-26 2:22 ` David Miller
2009-12-28 15:26 ` Andy Gospodarek
2009-12-28 15:33 ` David Miller
2009-12-28 21:55 ` Jay Vosburgh
2009-12-29 0:51 ` Andy Gospodarek
2010-01-04 5:19 ` David Miller
2009-12-01 4:11 ` [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device Eric Dumazet
2009-12-02 5:13 ` Eric Dumazet [this message]
2009-12-02 16:38 ` Andy Gospodarek
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=4B15F76B.9040203@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=andy@greyhouse.net \
--cc=fubar@us.ibm.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 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.