netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Bohac <jbohac@suse.cz>
To: David Miller <davem@davemloft.net>
Cc: fubar@us.ibm.com, jbohac@suse.cz,
	bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH] bonding: fix arp_validate on bonds inside a bridge
Date: Wed, 5 May 2010 15:33:01 +0200	[thread overview]
Message-ID: <20100505133301.GA18493@midget.suse.cz> (raw)
In-Reply-To: <20100504.161815.71114704.davem@davemloft.net>

On Tue, May 04, 2010 at 04:18:15PM -0700, David Miller wrote:
> From: Jay Vosburgh <fubar@us.ibm.com>
> > 	Tested and it looks to work as advertised.  I see only one minor
> > nit, there's a pr_debug that missed being renamed to the new function
> > name; here's the whole patch with that fixed.
> 
> I don't think you need the ugly arp hook.
> 
> Instead, it's much cleaner to provide a way for packet type taps to
> see the packet before bridge et al. decapsulation.  In fact this makes
> a lot of sense, wanting to see the device as __netif_receive_skb() saw
> it, with no changes whatsoever.
> 
> In fact ptype_all runs before bridging, ING, and MACVLAN decap the
> thing, so we could have a 'ptype_base_predecap[]' that we run over
> right after those.

I was considering exactly this, but I thought it would be
rejected because of the overhead for all packets received.

In fact, bonding could register the ARP handler in the ptype_all
list and check itself whether the packets were ARPs. This
would require no changes to __netif_receive_skb() at all, but
would cause an extra fuction call and a condition for _every_
packet once a bond with arp_validate would be up.

Having a ptype_base_predecap[] hashtable would still cause at
least a comparision for _every_ packet, even without bonding
being loaded (!).

The current patch causes an extra comparison only for packets
arriving on boding slaves.

If either of the ptype_all or ptype_base_predecap[] method is
preferred, I'll be happy to re-work the patch. I just thought
performance had bigger priority here.

-- 
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ


  reply	other threads:[~2010-05-05 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 12:59 [PATCH] bonding: fix arp_validate on bonds inside a bridge Jiri Bohac
2010-04-28 19:05 ` Jay Vosburgh
     [not found]   ` <20100429163921.GA4228@midget.suse.cz>
2010-04-29 18:57     ` Jay Vosburgh
2010-04-30 15:45       ` Jiri Bohac
2010-05-03 22:58         ` David Miller
2010-05-03 23:02           ` Jay Vosburgh
2010-05-04  1:06             ` Jay Vosburgh
2010-05-04 23:18               ` David Miller
2010-05-05 13:33                 ` Jiri Bohac [this message]
2010-05-06  7:35                   ` David Miller

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=20100505133301.GA18493@midget.suse.cz \
    --to=jbohac@suse.cz \
    --cc=bonding-devel@lists.sourceforge.net \
    --cc=davem@davemloft.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 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).