[ovs-dev] [PATCH] datapath: Fix mutual exclusion with bridge module.

Ian Campbell Ian.Campbell at eu.citrix.com
Thu Jul 1 12:07:13 PDT 2010


On Thu, 2010-07-01 at 19:43 +0100, Ben Pfaff wrote:
> On Thu, Jul 01, 2010 at 04:37:24PM +0100, Ian Campbell wrote:
> > On Wed, 2010-06-02 at 20:52 +0100, Ben Pfaff wrote:
> > > +int (*br_should_route_hook)(struct sk_buff *skb);
> > > +EXPORT_SYMBOL(br_should_route_hook); 
> > 
> > This hunk causes warnings at build time when integrated into a kernel
> > tree:
> >         WARNING: net/openvswitch/openvswitch_mod: 'br_should_route_hook' exported twice. Previous export was in net/bridge/bridge.ko
> >         WARNING: modpost: Found 2 section mismatch(es).
> > Under those circumstances it also confuses any distro packaging which
> > tries to maintain a stable kernel ABI by checking Modules.symvers, since
> > it will now contain duplicate symbols.
> 
> Mutual exclusion is the problem that never goes away.  I guess this is
> a hint that we need to merge upstream.
> 
> It's a shame that this causes packaging problems.  It's the only simple
> and reliable way I've found yet to prevent both bridge and vswitch from
> loading at the same time.
> 
> If you don't see a way to avoid the packaging problems or warnings (I
> don't) then I'll have to fall back to the alternate solutions that I had
> prepared before I found this one.  They are not nearly as clean or as
> uniform across kernel versions.  Too bad, I guess.

I don't have any cunning ideas for avoiding it.

For the out of tree modules openvswitch.git I suspect your mechanism is
fine as it is since it doesn't AFAIK have the problems I described in
that environment.

I only see the problems because I dump openvswitch.git/datapath into
net/openvswitch in our kernel (and wire it up with the build machinery)
and I'm happy enough to carry around a patch which drops this hunk (we
know XenServer won't load both), I just wanted to let you know.

FWIW I was wrong about Modules.symvers containing duplicate symbols, it
actually just causes the symbol's checksum to change for some reason.

Ian.





More information about the dev mailing list