netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mlxsw and rtnl lock
@ 2017-08-25 20:26 David Ahern
  2017-08-26 17:04 ` Ido Schimmel
  0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2017-08-25 20:26 UTC (permalink / raw)
  To: Jiri Pirko, Ido Schimmel; +Cc: netdev@vger.kernel.org

Jiri / Ido:

I was looking at the mlxsw driver and the places it holds the rtnl lock.
There are a lot of them and from an admittedly short review it seems
like the rtnl is protecting changes to mlxsw data structures as opposed
to calling into the core networking stack. This is going to have huge
impacts on scalability when both the kernel programming (user changes)
and the hardware programming require the rtnl.

With regards to the FIB notifier, why add the fib events to a work queue
that is processed asynchronously if processing the work queue requires
the rtnl lock? What is gained by deferring the work since a major side
effect of the work queue is the loss of error propagation back to the
user on the a failure. That is, if the FIB add/replace/append fails in
the h/w for any reason, offload is silently aborted (an entry in the
kernel log is still a silent abort).

Code in question:

fib_table_insert
- call_fib_entry_notifiers
  ...
    + mlxsw_sp_router_fib_event
      * allocate work entry
      * copy fib change data to it
      * take a reference on fib info / rt
      * schedule work

<some time later>

mlxsw_sp_router_fib{4,6}_event_work
- rtnl_lock

- mlxsw_sp_router_fib{4,6}_add
  if (err)
      mlxsw_sp_router_fib_abort    <----- not propagated to the user

- fib_info_put / rt6_release

David

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

end of thread, other threads:[~2017-08-29 21:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 20:26 mlxsw and rtnl lock David Ahern
2017-08-26 17:04 ` Ido Schimmel
2017-08-28 15:55   ` Roopa Prabhu
2017-08-28 18:00   ` David Ahern
2017-08-29  6:10     ` Arkadi Sharshevsky
2017-08-29 20:04       ` David Ahern
2017-08-29 21:18         ` Arkadi Sharshevsky
2017-08-29 19:16     ` Arkadi Sharshevsky

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