netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard.weinberger@gmail.com>
To: netdev@vger.kernel.org
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>,
	nikolay@cumulusnetworks.com, bridge@lists.linux-foundation.org,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Bridge port userspace events broken?
Date: Mon, 14 Oct 2019 22:33:22 +0200	[thread overview]
Message-ID: <CAFLxGvwnOi6dSq5yLM78XskweQOY6aPbRt==G9wv5qS+dfj8bw@mail.gmail.com> (raw)

Hi!

My userspace needs /sys/class/net/eth0/brport/group_fwd_mask, so I set
up udev rules
to wait for the sysfs file.
Without luck.
Also "udevadm monitor" does not show any event related to
/sys/class/net/eth0/brport when I assign eth0 to a bridge.

First I thought that the bridge code just misses to emit some events but
br_add_if() calls kobject_uevent() which is good.

Greg gave me the hint that the bridge code might not use the kobject model
correctly.

Enabling kobjekt debugging shows that all events are dropped:
[   36.904602] device eth0 entered promiscuous mode
[   36.904786] kobject: 'brport' (0000000028a47e33): kobject_uevent_env
[   36.904789] kobject: 'brport' (0000000028a47e33):
kobject_uevent_env: filter function caused the event to drop!

If I understood Greg correctly this is because the bridge code uses
plain kobjects which
have a parent object. Therefore all events are dropped.

Shouldn't brport be a kset just like net_device->queues_kset?

-- 
Thanks,
//richard

             reply	other threads:[~2019-10-14 20:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 20:33 Richard Weinberger [this message]
2019-10-15 10:48 ` Bridge port userspace events broken? nikolay
2019-10-15 10:53   ` nikolay
2019-10-16 14:58     ` Roopa Prabhu
2019-10-16 21:16       ` Richard Weinberger
2019-10-17  4:10         ` Roopa Prabhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFLxGvwnOi6dSq5yLM78XskweQOY6aPbRt==G9wv5qS+dfj8bw@mail.gmail.com' \
    --to=richard.weinberger@gmail.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).