All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC net-next 0/7] net: Allow FIB notifiers to fail add and replace
@ 2018-03-22 22:57 David Ahern
  2018-03-22 22:57 ` [PATCH RFC net-next 1/7] net: Fix fib notifer to return errno David Ahern
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: David Ahern @ 2018-03-22 22:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, roopa, shm, jiri, idosch, jakub.kicinski, David Ahern

I wanted to revisit how resource overload is handled for hardware offload
of FIB entries and rules. At the moment, the in-kernel fib notifier can
tell a driver about a route or rule add, replace, and delete, but the
notifier can not affect the action. Specifically, in the case of mlxsw
if a route or rule add is going to overflow the ASIC resources the only
recourse is to abort hardware offload. Aborting offload is akin to taking
down the switch as the path from data plane to the control plane simply
can not support the traffic bandwidth of the front panel ports. Further,
the current state of FIB notifiers is inconsistent with other resources
where a driver can affect a user request - e.g., enslavement of a port
into a bridge or a VRF.

As a result of the work done over the past 3+ years, I believe we are
at a point where we can bring consistency to the stack and offloads,
and reliably allow the FIB notifiers to fail a request, pushing an error
along with a suitable error message back to the user. Rather than
aborting offload when the switch is out of resources, userspace is simply
prevented from adding more routes and has a clear indication of why.

Patch 1 fixes call_fib_notifiers to extract the errno from the encoded
response from handlers.

Patches 2-5 allow the call to call_fib_notifiers to fail the add or
replace of a route or rule.

Patch 6 exports some devlink symbols.

Patch 7 adds a simple resource controller to netdevsim to illustrate
how a FIB resource controller can limit the number of route entries.

David Ahern (7):
  net: Fix fib notifer to return errno
  net: Move call_fib_rule_notifiers up in fib_nl_newrule
  net/ipv4: Move call_fib_entry_notifiers up for new routes
  net/ipv4: Allow notifier to fail route repolace
  net/ipv6: Move call_fib6_entry_notifiers up for route adds
  devlink: Export methods to get and set namespace
  netdevsim: Add simple FIB resource controller via devlink

 drivers/net/netdevsim/Makefile    |   4 +
 drivers/net/netdevsim/devlink.c   | 281 ++++++++++++++++++++++++++++++++++++++
 drivers/net/netdevsim/fib.c       | 264 +++++++++++++++++++++++++++++++++++
 drivers/net/netdevsim/netdev.c    |  12 +-
 drivers/net/netdevsim/netdevsim.h |  42 ++++++
 include/net/devlink.h             |   2 +
 net/core/devlink.c                |   6 +-
 net/core/fib_notifier.c           |   5 +-
 net/core/fib_rules.c              |   6 +-
 net/ipv4/fib_trie.c               |  27 +++-
 net/ipv6/ip6_fib.c                |  16 ++-
 11 files changed, 652 insertions(+), 13 deletions(-)
 create mode 100644 drivers/net/netdevsim/devlink.c
 create mode 100644 drivers/net/netdevsim/fib.c

-- 
2.11.0

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

end of thread, other threads:[~2018-03-26 14:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 22:57 [PATCH RFC net-next 0/7] net: Allow FIB notifiers to fail add and replace David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 1/7] net: Fix fib notifer to return errno David Ahern
2018-03-25  8:16   ` Ido Schimmel
2018-03-25 14:00     ` David Ahern
2018-03-25 15:37       ` Ido Schimmel
2018-03-22 22:57 ` [PATCH RFC net-next 2/7] net: Move call_fib_rule_notifiers up in fib_nl_newrule David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 3/7] net/ipv4: Move call_fib_entry_notifiers up for new routes David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 4/7] net/ipv4: Allow notifier to fail route repolace David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 5/7] net/ipv6: Move call_fib6_entry_notifiers up for route adds David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 6/7] devlink: Export methods to get and set namespace David Ahern
2018-03-22 22:57 ` [PATCH RFC net-next 7/7] netdevsim: Add simple FIB resource controller via devlink David Ahern
2018-03-23  6:50   ` Jiri Pirko
2018-03-23 14:31     ` David Ahern
2018-03-23 15:01       ` Jiri Pirko
2018-03-23 15:03         ` David Ahern
2018-03-23 15:05           ` Jiri Pirko
2018-03-23 15:13             ` David Ahern
2018-03-24  7:26               ` Jiri Pirko
2018-03-24 15:05                 ` David Ahern
2018-03-24 16:02                   ` Jiri Pirko
2018-03-25 14:24                     ` David Ahern
2018-03-26 14:33                       ` Jiri Pirko
2018-03-24  3:47   ` Jakub Kicinski
2018-03-24 15:02     ` David Ahern
2018-03-25  6:35       ` Jakub Kicinski
2018-03-25 14:27         ` David Ahern
2018-03-25 19:53           ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.