[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100506.003523.214214350.davem@davemloft.net>
Date: Thu, 06 May 2010 00:35:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jbohac@...e.cz
Cc: fubar@...ibm.com, bonding-devel@...ts.sourceforge.net,
netdev@...r.kernel.org
Subject: Re: [PATCH] bonding: fix arp_validate on bonds inside a bridge
From: Jiri Bohac <jbohac@...e.cz>
Date: Wed, 5 May 2010 15:33:01 +0200
> 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.
Well, let's do some thinking.
If there are any ptype_all[] entries at all, processing of every
packet will be expensive.
Also, the ptype_base_predecap[] is unlikely to have any entries
unless bonding is on in this special mode. But if it is, we
can accept a little bit of extra overhead.
So we can address all of this without adding undue overhead for people
not using this stuff, by simply having an atomic counter which shows
how many ptype_all[] or ptype_base_predecap[] entries exist.
And at the top level we test that __read_mostly atomic variable before
traversing the ptype_all[] and ptype_base_predecap[] lists.
That should address all of the issues.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists