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

Pravin Shelar pshelar at nicira.com
Mon Oct 1 06:35:15 UTC 2012

On Thu, Sep 27, 2012 at 8:18 PM, Tadaaki Nagao <nagao at stratosphere.co.jp> wrote:
> 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...
right, there is no call to sysfs_crate_grp() when adding a interface,
need to fix comment.
But it does panic on 2.6.32 while creating sysfs hierarchy in
sysfs_create_dir(). I am not sure which kernel does fixes this issue.
I will see if we could have better check here.


> Thanks,
> Tadaaki Nagao <nagao at stratosphere.co.jp>
> Stratosphere Inc.
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

More information about the dev mailing list