netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next RFC 0/3] switchdev: change locking
@ 2015-10-07 18:30 Jiri Pirko
  2015-10-07 18:30 ` [patch net-next RFC 1/3] switchdev: assert rtnl in switchdev_port_obj_del Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jiri Pirko @ 2015-10-07 18:30 UTC (permalink / raw)
  To: netdev
  Cc: davem, idosch, eladr, sfeldma, f.fainelli, linux, vivien.didelot,
	andrew, john.fastabend, David.Laight

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-10-10  7:30 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 18:30 [patch net-next RFC 0/3] switchdev: change locking Jiri Pirko
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

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).