netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, eladr@mellanox.com,
	sfeldma@gmail.com, f.fainelli@gmail.com, linux@roeck-us.net,
	vivien.didelot@savoirfairelinux.com, andrew@lunn.ch,
	john.fastabend@gmail.com, David.Laight@ACULAB.COM
Subject: [patch net-next RFC 0/3] switchdev: change locking
Date: Wed,  7 Oct 2015 20:30:49 +0200	[thread overview]
Message-ID: <1444242652-17260-1-git-send-email-jiri@resnulli.us> (raw)

This is something which I'm currently struggling with.
Callers of attr_set and obj_add/del often hold not only RTNL, but also
spinlock (bridge). So in that case, the driver implementing the op cannot sleep.

The way rocker is dealing with this now is just to invoke driver operation
and go out, without any checking or reporting of the operation status.

Since it would be nice to at least put a warning in case the operation fails,
it might make sense to do this in delayed work directly in switchdev core
instead of implementing this in separate drivers. And that is what this patchset
is introducing. (The part of removing "nowait" from rocker is not implemented
in this patchset, but it is straightforward).

Does this make sense. Any ideas?

Jiri Pirko (3):
  switchdev: assert rtnl in switchdev_port_obj_del
  switchdev: allow caller to explicitly use deferred attr_set version
  switchdev: introduce deferred variants of obj_add/del helpers

 include/net/switchdev.h   |   6 ++
 net/bridge/br_fdb.c       |   2 +-
 net/bridge/br_stp.c       |   4 +-
 net/switchdev/switchdev.c | 203 ++++++++++++++++++++++++++++++++++------------
 4 files changed, 160 insertions(+), 55 deletions(-)

-- 
1.9.3

             reply	other threads:[~2015-10-07 18:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 18:30 Jiri Pirko [this message]
2015-10-07 18:30 ` [patch net-next RFC 1/3] switchdev: assert rtnl in switchdev_port_obj_del Jiri Pirko
2015-10-07 18:30 ` [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version Jiri Pirko
2015-10-07 18:54   ` kbuild test robot
2015-10-08  4:27   ` Scott Feldman
2015-10-08  5:39     ` Jiri Pirko
2015-10-08  6:03       ` Scott Feldman
2015-10-08  8:26         ` Jiri Pirko
2015-10-09  4:39           ` Scott Feldman
2015-10-09  6:46             ` Jiri Pirko
2015-10-10  2:43               ` Scott Feldman
2015-10-10  7:30                 ` Jiri Pirko
2015-10-07 18:30 ` [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers Jiri Pirko
2015-10-08  6:45   ` Or Gerlitz
2015-10-08  8:28     ` Jiri Pirko
2015-10-08 13:09       ` Jiri Pirko
2015-10-08 13:21         ` Or Gerlitz
2015-10-08 13:25           ` Jiri Pirko
2015-10-08 14:41             ` Or Gerlitz
2015-10-08 14:44               ` Jiri Pirko
2015-10-10  2:30             ` Scott Feldman

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=1444242652-17260-1-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=David.Laight@ACULAB.COM \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=john.fastabend@gmail.com \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.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).