[ovs-dev] "brctl show" doesn't list attached interfaces

Tadaaki Nagao nagao at stratosphere.co.jp
Fri Sep 28 03:18:18 UTC 2012


Hi,

In "Re: [ovs-dev] "brctl show" doesn't list attached interfaces",
    Jesse Gross <jesse at 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...

Thanks,
Tadaaki Nagao <nagao at stratosphere.co.jp>
Stratosphere Inc.



More information about the dev mailing list