On Thu, Sep 27, 2012 at 8:18 PM, Tadaaki Nagao <na...@stratosphere.co.jp> wrote: > Hi, > > In "Re: [ovs-dev] "brctl show" doesn't list attached interfaces", > Jesse Gross <je...@nicira.com> wrote: >> I think it's the opposite problem - that OVS ports aren't appearing in >> brctl output. There's a bug with namespaces on certain kernels when >> populating the sysfs entries that Pravin ran into so we don't do that >> on the theory that missing entries are better than crashing. > > In datapath/dp_sysfs_dp.c:ovs_dp_sysfs_add_dp() there's a similar NULL > check with the same "could panic" comment, which makes sense to me because > sysfs_create_group() is actually called after the check. > > --------8<--------cut here--------8<-------- > #ifdef CONFIG_NET_NS > /* Due to bug in 2.6.32 kernel, sysfs_create_group() could panic > * in other namespace than init_net. Following check is to avoid it. > */ > if (!kobj->sd) > return -ENOENT; > #endif > /* Create /sys/class/net/<devname>/bridge directory. */ > err = sysfs_create_group(kobj, &bridge_group); > --------8<--------cut here--------8<-------- > > OTOH, after the check in datapath/dp_sysfs_if.c:ovs_dp_sysfs_add_if() > there's no call to sysfs_create_group() as I mentioned in the first mail. > And that made me uncertain what the check is actually meant for...
Pravin originally wrote that code, so I'll let him comment on the call in ovs_dp_sysfs_add_if(). _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev